Jump to content
  • Advertisement
Sign in to follow this  
Jernej.L

OpenGL efficient storing of data for fastest drawing in opengl

This topic is 3807 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
If you want to do this fast, you need to 'merge' all the vertex information so you just have one index array.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!