| View previous topic :: View next topic |
| Author |
Message |
gambiting
Joined: 17 Aug 2006 Posts: 154
|
Posted: Sat Mar 22, 2008 7:22 pm Post subject: Porting SDL + PSPGL game to PC |
|
|
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 |
|
 |
Smong
Joined: 04 Sep 2007 Posts: 82
|
Posted: Mon Mar 24, 2008 3:53 am Post subject: |
|
|
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 |
|
 |
gambiting
Joined: 17 Aug 2006 Posts: 154
|
Posted: Mon Mar 24, 2008 8:05 am Post subject: |
|
|
| 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 |
|
 |
Smong
Joined: 04 Sep 2007 Posts: 82
|
Posted: Mon Mar 24, 2008 11:40 pm Post subject: |
|
|
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 |
|
 |
|