Do unbinding textures cause a crash (PSPGL)?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
GlennNZ
Posts: 25
Joined: Sat Jan 13, 2007 1:13 pm

Do unbinding textures cause a crash (PSPGL)?

Post by GlennNZ »

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: Select all

glBindTexture(GLTEXTURE_2D, 0)
but as soon as I unbind other textures I get
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.
Post Reply