Porting SDL + PSPGL game to PC

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

Moderators: cheriff, TyRaNiD

Post Reply
gambiting
Posts: 154
Joined: Thu Aug 17, 2006 5:39 pm

Porting SDL + PSPGL game to PC

Post by gambiting »

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!
Smong
Posts: 82
Joined: Tue Sep 04, 2007 4:44 am

Post by Smong »

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);
(+[__]%)
gambiting
Posts: 154
Joined: Thu Aug 17, 2006 5:39 pm

Post by gambiting »

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

Code: Select all

Things to check:
glEnable(GL_TEXTURE_2D);
Enabled
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
I don't use it,what is it doing?
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!
Smong
Posts: 82
Joined: Tue Sep 04, 2007 4:44 am

Post by Smong »

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).
(+[__]%)
Post Reply