I'm looking for some help on a game I'm working on. I have it set up to compile both on Linux and the Pandora using DJ Willis toolchain. I'm able to build the program on both systems. The only difference between this code is:
#ifdef PANDORA
#include <SDL_Pandora/SDL.h>
#include <SDL_Pandora/SDL_opengles.h>
#else
#include <SDL/SDL.h>
#include <SDL/SDL_opengl.h>
#endif
Where the SDL_Pandora is the location of the Cpasjuste SDL 1.3 build for pandora.
The other difference is glOrtho vs. glOrthof.
On the pandora the window appears, but nothing is drawn. I have an FPS status at the top and the draw calls are happening, but the window is black.
The progam uses SDL_image to load pngs for the display.
Looking for any tips on what to check.
Here is the code to draw the textures:
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glVertexPointer(2, GL_FLOAT, 0,vertexs);
glTexCoordPointer(2, GL_FLOAT, 0, coords);
glDrawArrays(GL_TRIANGLES,0,quadCount);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
and then I use:
SDL_GL_SwapBuffers();
#ifdef PANDORA
#include <SDL_Pandora/SDL.h>
#include <SDL_Pandora/SDL_opengles.h>
#else
#include <SDL/SDL.h>
#include <SDL/SDL_opengl.h>
#endif
Where the SDL_Pandora is the location of the Cpasjuste SDL 1.3 build for pandora.
The other difference is glOrtho vs. glOrthof.
On the pandora the window appears, but nothing is drawn. I have an FPS status at the top and the draw calls are happening, but the window is black.
The progam uses SDL_image to load pngs for the display.
Looking for any tips on what to check.
Here is the code to draw the textures:
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glVertexPointer(2, GL_FLOAT, 0,vertexs);
glTexCoordPointer(2, GL_FLOAT, 0, coords);
glDrawArrays(GL_TRIANGLES,0,quadCount);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
and then I use:
SDL_GL_SwapBuffers();