Tuesday 15 September 2009

VBO's But still no projects

Decided to have a crack at using VBO's rather than the older displaylists, since the extension code Zawran had supplied had the needed extensions for opengl defined, I set about creating a simple test using a cube for the data. I got it up and running fairly quickly and then re-coded a recent cube field effect to use it over the older displaylist code, while I didn't get massive jump in fps (about 5-10) I can see it being more useful for more complex objects as the data wont be pushed from system ram to vid ram all the time. With the basic code working I decided to wrap the whole VBO system up in a bmax type, I can basically create an instance of the type, add vertex,normal and tex coord data to it, then call a method to create the VBO's. Then when I need to use the object I have 3 methods, one call to bind the VBO, one to draw the VBO and finally one to unbind the VBO. The layout of the type follows the same idea as the FBO code which will make the use similar and keeps things simple. I also added a quick method to create a cube VBO since its a fairly common shape and easy to define to test the type's use. Still haven't settled on a project idea yet but at least the base code is looking more useful with each experiment.

On a positive note my books have arrived so now I can see what else I can learn about, I am sure there are commands and features of opengl that I haven't even scratched the surface of, not including shaders, which I also have the book for.

No comments:

Post a Comment