forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Do unbinding textures cause a crash (PSPGL)?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
GlennNZ



Joined: 13 Jan 2007
Posts: 25

PostPosted: Sat Dec 13, 2008 1:22 pm    Post subject: Do unbinding textures cause a crash (PSPGL)? Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group