I can get away with unbinding just one texture by using
Code: Select all
glBindTexture(GLTEXTURE_2D, 0)
usually I just get the Exception - Interrupt and nothing else. The PSP alse crashes. I'm using PSP Link.Exception - Interrupt
Thread ID - 0x0027720F
What I used to have is a bunch of glEnable/glDisable(GL_TEXTURE_2D) commands everywhere, but someone advised me that state changes such at glEnable/glDisable are a bit expensive. Thus I decided to instead bind and unbind textures and just enable GL_TEXTURE_2D at the beginning of the application.
I need to unbind textures (or disable textures) because some of my models are drawn in intermediate mode and will appear black if there is still a texture bound.
The code I have works fine on mac and linux so I'm a little stumped why it comes unstuck on PSP. I had to rip quite a lot of code away to get this far.
Cheers to anyone with some insight.