Sign in to follow this  

vertex/texcoord/color arrays

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

This topic is 4663 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this