OpenGL Indexed Geometry Buffer

posted in noaktree leaves
Published June 17, 2008
Advertisement
I've created a simple semi-flexible class to manage indexed geometry buffers. It allows the client to choose between hardware buffers or local buffers which it manages and defaults to when hardware buffers aren't available. This is all new to me having been in DirectX world for so long. Hardware buffers are not mapped to local pointers rather I opted to force the client to keep a local copy. I did this because from what I can tell it will be a faster solution. To keep things simple the class enforces vertex attribute order. Attributes available are vert, color, uv, normal, tangent, and bi tangent which are interleaved into the vertex buffer. It is able to pass these vertex attributes to shader programs though this is as yet untested. Index buffers are made of 16 bit indices.

Next up I'll create an .OBJ loader that takes an initialized IGB as a parameter with storage offsets.
Previous Entry Cult of Gameplay
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement