Jump to content
  • Advertisement
Sign in to follow this  
Shanjaq

System Compatibility with GL_COLOR_ARRAY and GL_INDEX_ARRAY?

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

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
Advertisement
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
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!