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 

Porting SDL + PSPGL game to PC

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



Joined: 17 Aug 2006
Posts: 154

PostPosted: Sat Mar 22, 2008 7:22 pm    Post subject: Porting SDL + PSPGL game to PC Reply with quote

Hi! Now,my game is complete,and I would like to port it to PC. I'm compiling it using all standard libs(SDL,SDL_image,SDL_gfx,SDL_mixer,GL,GLU) ,and source code is almost identical to psp version(without all psp functions,like callbacks,setting frequency and so on). The problem is,that my game compiles without any problems. And it loads without any problems. But texturing won't work - all objects in game are not textured. Any idea why it happens? All images needed are in good place,and program should quit if it encounters any problem with loading images - and it doesn't. Please help.
_________________
My projects:
PSPSnake
Mandelbrot Fractal Generator
Shoot4Fun
BlowUp!
Back to top
View user's profile Send private message
Smong



Joined: 04 Sep 2007
Posts: 82

PostPosted: Mon Mar 24, 2008 3:53 am    Post subject: Reply with quote

What are you seeing? Shades of gray on your models?

Things to check:
glEnable(GL_TEXTURE_2D);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);

Probably not these, since they just turn your models inside out:
glEnable/Disable(GL_CULL_FACE);
glCullFace(GL_BACK or GL_FRONT);
glFrontFace(GL_CW or GL_CCW);
_________________
(+[__]%)
Back to top
View user's profile Send private message
gambiting



Joined: 17 Aug 2006
Posts: 154

PostPosted: Mon Mar 24, 2008 8:05 am    Post subject: Reply with quote

Smong wrote:
What are you seeing? Shades of gray on your models?
No,they are just white

Code:
Things to check:
glEnable(GL_TEXTURE_2D);
Enabled
Quote:

glEnableClientState(GL_TEXTURE_COORD_ARRAY);
I don't use it,what is it doing?
Quote:

Probably not these, since they just turn your models inside out:
glEnable/Disable(GL_CULL_FACE);
glCullFace(GL_BACK or GL_FRONT);
glFrontFace(GL_CW or GL_CCW);
No,I don't use them.
_________________
My projects:
PSPSnake
Mandelbrot Fractal Generator
Shoot4Fun
BlowUp!
Back to top
View user's profile Send private message
Smong



Joined: 04 Sep 2007
Posts: 82

PostPosted: Mon Mar 24, 2008 11:40 pm    Post subject: Reply with quote

glEnableClientState(GL_TEXTURE_COORD_ARRAY);
This is needed before glDrawArrays or glDrawElements if you are using glTexCoordPointer. If you use glInterleavedArrays it gets turned on automatically (but doesn't get turned off automatically afterwards).
_________________
(+[__]%)
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