sebt3
homebrew player (P. & C.)
Hi there,
Thanks to the awesome Pickle, I've started my first conversion of a GL game to GLES. I picked up briquolo, because, well I like it
Using Pickle eglport.*, his GLUES built and his instructions, I managed to get the game start with a correct EGL context.
I've converted all the immediates modes (once again, using pickle instructions and his gish and ken's sources). And I've some success.
Here are the remaining problems :
- if you try to start the game, the game freeze (I'll gdb this once the others issues are fixed) ; The level editor work well though.
- Text background seems to have an alpha problem, so in the menu all the entries are enlighted the same way (that doesnt help to see which item is selectionned )
- There are no textures !
My main problem is the last part, i've spend 2 days hacking around for that, whithout any results and I'm basically clueless.
I've looked, the games does found the right path for the files. All textures are square (largest is 256x256).
After the glTexImage2D and the following glTexParameteri, glGetError reports no errors.
Oh, there are text displayed so the glyph textures are loaded correctly. but this is not the same part of the code loading these.
The texture are created at the initialisation of the game, but are binded to surfaces later on. As there are not so many textures, I'm pretty sure the SGX memory isnt overloaded.
Beside for the texts, there are 3 pairs of functions to load/bind the textures :
- one for the game overlay where you see how many live left you have (I cant test that, see 1st issue, but that's only one texture so...)
- one for semi-transparants textures (water, some effects)
- one for opaque textures
The last too are really look-alike :
Go through a first list of texture and bind these to surfaces.
Go through a second list of texture, bind them to surfaces doing this strange thing :
Then the vertex coords are build around the values of pos.
I tried to cheat doing :
But this is obviously flawed.
You can get my current code here. Be sure to define PANDORA in your CFLAGS before configuring (as all my edit are inside #ifdef PANDORA blocks ; yep, autotools have been cheated for GL discovery). If you prefer reading a patch, see here. the stuff discussed earlier are in MOGL_Afficheur::_AfficherImageOpaque.
Any help would be welcome. I would even be pleased to see someone finishing my work (as long as I can get a look at the resulting code ;P)
Thanks to the awesome Pickle, I've started my first conversion of a GL game to GLES. I picked up briquolo, because, well I like it
Using Pickle eglport.*, his GLUES built and his instructions, I managed to get the game start with a correct EGL context.
I've converted all the immediates modes (once again, using pickle instructions and his gish and ken's sources). And I've some success.
Here are the remaining problems :
- if you try to start the game, the game freeze (I'll gdb this once the others issues are fixed) ; The level editor work well though.
- Text background seems to have an alpha problem, so in the menu all the entries are enlighted the same way (that doesnt help to see which item is selectionned )
- There are no textures !
My main problem is the last part, i've spend 2 days hacking around for that, whithout any results and I'm basically clueless.
I've looked, the games does found the right path for the files. All textures are square (largest is 256x256).
After the glTexImage2D and the following glTexParameteri, glGetError reports no errors.
Oh, there are text displayed so the glyph textures are loaded correctly. but this is not the same part of the code loading these.
The texture are created at the initialisation of the game, but are binded to surfaces later on. As there are not so many textures, I'm pretty sure the SGX memory isnt overloaded.
Beside for the texts, there are 3 pairs of functions to load/bind the textures :
- one for the game overlay where you see how many live left you have (I cant test that, see 1st issue, but that's only one texture so...)
- one for semi-transparants textures (water, some effects)
- one for opaque textures
The last too are really look-alike :
Go through a first list of texture and bind these to surfaces.
Go through a second list of texture, bind them to surfaces doing this strange thing :
Code:
glRasterPos3f(it->x, it->y, it->z);
GLboolean positionValide;
glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID, & positionValide);
if (positionValide)
{
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
gluOrtho2D(0,_Largeur,0,_Hauteur);
float pos[4];
glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);
I tried to cheat doing :
Code:
pos[0] = it->x;
pos[1] = it->y;
pos[3] = it->z;
But this is obviously flawed.
You can get my current code here. Be sure to define PANDORA in your CFLAGS before configuring (as all my edit are inside #ifdef PANDORA blocks ; yep, autotools have been cheated for GL discovery). If you prefer reading a patch, see here. the stuff discussed earlier are in MOGL_Afficheur::_AfficherImageOpaque.
Any help would be welcome. I would even be pleased to see someone finishing my work (as long as I can get a look at the resulting code ;P)