efficient storing of data for fastest drawing in opengl
I have a bunch of files exported, and they are in an interesting format, first of all they contain an array of uv coords and 3 triangle-index indices, so basically the indexes for vertices and uv maps are stored together, however the vertexes and normals are in separate array, now i checked out the glVertexPointer and other similar functions, but none od them offers a way to handle this without me converting a lot of this data at runtime, but maybe some of you can explain me a better way to handle such data with minimal overhead?
[Edited by - Delfi on February 16, 2008 12:19:51 PM]
If the indices are interlaced with the vertices, then you need to separate them.
For vertices, uv, normals, use the stride parameter in glVertexPointer, glTexCoordPointer, glNormalPointer.
For vertices, uv, normals, use the stride parameter in glVertexPointer, glTexCoordPointer, glNormalPointer.
If you want to do this fast, you need to 'merge' all the vertex information so you just have one index array.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement