Jump to content
  • Advertisement
Sign in to follow this  
Muncher

vertex/texcoord/color arrays

This topic is 4911 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

Hello!! I am rendering a cube with a vertex array, a texture coorinate array, and a color array. There are 8 unique vertices, 4 unique texture coordinates and 4 unique colors, each of these is in an array. How would i draw these arrays using glDrawElements() without making each array the same size (and duplicating texture coordinates and colors)??? And without using interleaved arrays?? Muncher :)

Share this post


Link to post
Share on other sites
Advertisement
Vertex arrays require the same number of elements in each array. So you'd have to duplicate the texture coordinates and colors.

If the data is static and you don't want to duplicate data (an admirable goal), then you can look at display lists for rendering.

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!