Sign in to follow this  
Shanjaq

System Compatibility with GL_COLOR_ARRAY and GL_INDEX_ARRAY?

Recommended Posts

This is very strange, I have been successfully using GL_COLOR_ARRAY and GL_INDEX_ARRAY for weeks now on most of the machines in my network, yet some people I send my demo to have an immediate run-time error when these ClientStates are enabled. Another strange thing is that I can still use Index Arrays with my glDrawElements calls even with GL_INDEX_ARRAY disabled! Are these two client states problematic for anyone else out there? What should I watch out for when using them to prevent these mysterious run-time errors?

Share this post


Link to post
Share on other sites
Quote:
Original post by Shanjaq
Another strange thing is that I can still use Index Arrays with my glDrawElements calls even with GL_INDEX_ARRAY disabled!
GL_INDEX_ARRAY is for specifying a color index array with glIndexPointer, not for the array of indices that you pass to glDrawElements. The reason it crashes on some drivers and not on others is because the behaviour for having an enabled vertex array client state without a corresponding pointer is undefined; some implementations crash when that happens, and some ignore it. It's debatable which option is better.

Share this post


Link to post
Share on other sites

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