retaining pointer settings after disabling vertex arrays?

Started by
3 comments, last by bootstrap 17 years, 5 months ago
In OpenGL, you can set arrays after enabling them, right? So then, what if you set the pointer for the vertex array before enabling? Would the pointer information still be retained by OGL? Also, does the same go for disabling the state and then enabling the state again?
*After Argument*P1: What was it about?P2: Something involving a chair, a cat, and a rubber ducky...
Advertisement
This is the kinda thing you could have found out via experimentation..
The pointer to an array and whether an array is enabled are completely independent states. Changing one does not affect the other, so you can set them in any order, and OpenGL remembers what the most recent state is. All that matters is what state is set/enabled/disabled when you actually draw something.
To Phantom: I forgot to mention I'm only typing up code to compile later once I re-set up my mingw32 compiler (which I keep putting off <_<)... which basically means that I'm just editing code at the moment.

To Eric: Thank you.
*After Argument*P1: What was it about?P2: Something involving a chair, a cat, and a rubber ducky...
Quote:Original post by Eric Lengyel
The pointer to an array and whether an array is enabled are completely independent states. Changing one does not affect the other, so you can set them in any order, and OpenGL remembers what the most recent state is. All that matters is what state is set/enabled/disabled when you actually draw something.
If that is true, how do you explain the problem I had described in the recent message "strange VBO / draw / line behavior"? It appears OpenGL loses certain aspects of state, or somehow associates certain state implicitly and remembers certain state only when other state is active.

This topic is closed to new replies.

Advertisement