GlennNZ
Joined: 13 Jan 2007 Posts: 25
|
Posted: Sat Dec 13, 2008 1:22 pm Post subject: Do unbinding textures cause a crash (PSPGL)? |
|
|
After totally stripping back my code, I think I've isolated my program crash to unbinding textures.
I can get away with unbinding just one texture by using
| Code: | | glBindTexture(GLTEXTURE_2D, 0) |
but as soon as I unbind other textures I get
| Quote: | Exception - Interrupt
Thread ID - 0x0027720F | usually I just get the Exception - Interrupt and nothing else. The PSP alse crashes. I'm using PSP Link.
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. |
|