I swear this worked for me before, but now I’m crashing(read: access violation). What is the best way to enable/disable texture mapping when using glDrawElements?
What I had been doing is enabling the texture coordinate array at program initialization, then just enabling/disabling texture mapping as I needed it. This seemed to work fine. What appears to be the issue now is that glDrawElements crashes if the texture coordinate vertex pointer is not initialized with something. It seems to me that, if texture mapping is not enabled, glDrawElements should just ignore the texture coordinate array. Why does it not do this? Do I need to enable/disable the texture coordinate array each time I enable/disable texture mapping?