Gles2D, An Opengl(Es) Cross Platform 2D Library


I just put a link to the source code (git) in the first post. The code is uncommented and not the best one you'v seen but it do the job.

If someone want to help, he can send me some git/diff patch so i can apply them. I think the better place for improvement is the TTF font functions (also the bmp font one which use a non standard bmp file). The GLES2D_DrawTextScroll one for example use a lot of cpu time on the pandora (it use FTGL for now, if someone can tweak/replace it with a proper C one, it would be great). I will ask for help on this topic so if people are interessed by a simple to use (for the user) library, i bet you should come here sometime so we can do something cool.

Ps to Lozrus : this version should fix your keyboard problem, but the function has changed so take a look at the new examples :
http://github.com/Cpasjuste/libGLES2D_Examples

See you.
 
No one ?
Crap, We could do something great for the pandora !

Else I will upload my pmenu sources soon (official pandora minimal GUI) and it use GLES2D. So all the possible people should be familiar with this library to help improve the default menu (dfmesrelxy..., I'm sure you'll be happy to partiticpe :)
 
Cpasjuste said:
No one ?
Crap, We could do something great for the pandora !

Else I will upload my pmenu sources soon (official pandora minimal GUI) and it use GLES2D. So all the possible people should be familiar with this library to help improve the default menu (dfmesrelxy..., I'm sure you'll be happy to partiticpe :)
It uses GLES2D too? Why not Clutter or Qt? I'm not saying that your library is bad, but that it will be very tedious for you to implement things such as configurable hotkeys, tab jumps for controls, keyboard navigation in general, natural scrolling for the menu, animations etc... if the framework underneath doesn't support it already. You're reinventing the wheel in the best of cases.
 
Last edited by a moderator:
All this qt and other stuff are far too complicated. The goal of the library (and the menu) is to be very simple to use and basic. I also want the menu to work without X, wich is possible without code change with the lib.
 
dflemstr said:
Cpasjuste said:
No one ?
Crap, We could do something great for the pandora !

Else I will upload my pmenu sources soon (official pandora minimal GUI) and it use GLES2D. So all the possible people should be familiar with this library to help improve the default menu (dfmesrelxy..., I'm sure you'll be happy to partiticpe :)
It uses GLES2D too? Why not Clutter or Qt? I'm not saying that your library is bad, but that it will be very tedious for you to implement things such as configurable hotkeys, tab jumps for controls, keyboard navigation in general, natural scrolling for the menu, animations etc... if the framework underneath doesn't support it already. You're reinventing the wheel in the best of cases.
He will be implementing wheels without adding a lot of enormous dependencies, huge difference.
 
Last edited by a moderator:
Cpasjuste said:
All this qt and other stuff are far too complicated. The goal of the library (and the menu) is to be very simple to use and basic. I also want the menu to work without X, wich is possible without code change with the lib.
I see. Well, you should check out the thread in General then that discusses what will be the default menu on the Pandora when it launches. Some of the first Pandoras will be sold/given to reviewers, and those reviewers will think it's very strange that the default menu cannot compete with, say, Maemo or Moblin (no offense meant) which might make it a bad choice to include the pmenu as the default menu for the Pandora. (unless, of course, the "interface chooser" stays as it is, more alternatives are given in that chooser, and the default alternative is something more, let's say, explicit.

I understand that the pmenu will be worked on before/after launch to reach the levels of gpmenu (was that what it was called?) or even more but reviewers will be absolutely oblivious about that.

Now back on topic; let's create a new discussion about eventual improvements to pmenu if necessary.
 
Last edited by a moderator:
I think pmenu is already at the level of gpemu.
It's not the default menu for the pandora, but the default minimal menu. His job is just to allow us to launch pandora application in a simple way. Put a .pnd packaged app on your sd card and launch it. The goal is not to have a wonderfull OS with music, video, mail etc support. There's nothing to compore to mameo and other things like that. And for that, it's in a good shape. People that want more will launch X desktop for that since the pandora handle that very well.
Like you said, some better options will come for sure when the pandora will be available.

So, please, build SDL 1.3, build GLED2D library with that and help me :p

edit: in fact it will be the default menu because we have nothing better. Anyone can build a menu/system for the pandora on any i386 computer, it should then be easy to port to the pandora.
I will also release the sources for that. It's I think a good example on how to handle package pnd app and pnd discovering (and you are for something in that!).
 
Cpasjuste said:
I think pmenu is already at the level of gpemu.
That's awesome. I haven't seen pmenu for a long time so I didn't know.
Cpasjuste said:
It's not the default menu for the pandora, but the default minimal menu. His job is just to allow us to launch pandora application in a simple way. Put a .pnd packaged app on your sd card and launch it. The goal is not to have a wonderfull OS with music, video, mail etc support. There's nothing to compore to mameo and other things like that. And for that, it's in a good shape. People that want more will launch X desktop for that since the pandora handle that very well.
Print that explanation on the boot screen so that reviewers see it too, and I'm happy! :p
Cpasjuste said:
Like you said, some better options will come for sure when the pandora will be available.
Sure, efegeas alternative seems compelling; it's more suited for us power users I think.

Cpasjuste said:
So, please, build SDL 1.3, build GLED2D library with that and help me :p
OK, I'll see what I can do/if I can do something. Haven't taken a look at the source yet.

Cpasjuste said:
edit: in fact it will be the default menu because we have nothing better. Anyone can build a menu/system for the pandora on any i386 computer, it should then be easy to port to the pandora.
Of course, the Pandora hasn't even launched so there aren't that many alternatives. I might make one for myself just for fun if I get time for it.
Cpasjuste said:
I will also release the sources for that. It's I think a good example on how to handle package pnd app and pnd discovering (and you are for something in that!).
Yeah, about that... I really want to see how you handle the interaction with libpnd; when I made my changes to it, I made sure that it was binary compatible with previous builds of it so my changes weren't radical in any way from the library user's POV. The libpnd API for discovering PNDs and reading PXMLs is very strange though, and I'd really like to see an implementation that manages to use them efficiently.
 
Last edited by a moderator:
Hum, for the sources you will probably be disapointed. I'm not a good programmer and there is for sure a lot of mistake but it's working. I
 
Cpasjuste said:
No one ?
Crap, We could do something great for the pandora !

Else I will upload my pmenu sources soon (official pandora minimal GUI) and it use GLES2D. So all the possible people should be familiar with this library to help improve the default menu (dfmesrelxy..., I'm sure you'll be happy to partiticpe :)
Sorry for the slow reply, just got back from Japan. I did have good internet access in the hotel but was usually too drunk, or tired to check the forums. Anyway, this is great, thanks for resolving my keyboard issues. I'll have a play with this tonight if my wife lets me :)
 
Last edited by a moderator:
Cpasjuste said:
I just put a link to the source code (git) in the first post. The code is uncommented and not the best one you'v seen but it do the job.

If someone want to help, he can send me some git/diff patch so i can apply them. I think the better place for improvement is the TTF font functions (also the bmp font one which use a non standard bmp file). The GLES2D_DrawTextScroll one for example use a lot of cpu time on the pandora (it use FTGL for now, if someone can tweak/replace it with a proper C one, it would be great). I will ask for help on this topic so if people are interessed by a simple to use (for the user) library, i bet you should come here sometime so we can do something cool.

Ps to Lozrus : this version should fix your keyboard problem, but the function has changed so take a look at the new examples :
http://github.com/Cp...GLES2D_Examples

See you.
Thanks for releasing the source, still not had chance to take a look, however. :)
 
Last edited by a moderator:
Hi all
First of all thanks for this nice project !

I downloaded the source in order to compile by myself on a linux box (I have the same problem than Lozrus : keyboard events are not detected),
I managed to compile SDL1.3, but where did you find your opengl es implementation ? I found this one : http://www.khronos.org/opengles/documentation/gles-1.0c.tgz and managed to compile it, but you seem to use another one, at least a 1.1 ...
 
mikerodd said:
Hi all
First of all thanks for this nice project !

I downloaded the source in order to compile by myself on a linux box (I have the same problem than Lozrus : keyboard events are not detected),
I managed to compile SDL1.3, but where did you find your opengl es implementation ? I found this one : http://www.khronos.org/opengles/documentation/gles-1.0c.tgz and managed to compile it, but you seem to use another one, at least a 1.1 ...
http://www.imgtec.com/powervr/insider/sdk/KhronosOpenGLES1xMBX.asp
 
Last edited by a moderator:
Thanks dflemstr,

I installed this SDK and compile was OK after some minor changes. I'm not familiar with git but here's what git-diff outputed :

Code:
diff --git a/examples/demo/main.c b/examples/demo/main.c
index ad27d3c..e65cdcc 100755
--- a/examples/demo/main.c
+++ b/examples/demo/main.c
@@ -39,7 +39,7 @@ void exitError ( char *errormsg )
 	GLES2D_TilesMapFree();
 	GLES2D_FreeFont( font ); font = NULL;
 
-	GLES2D_QuitVideo();	
+	GLES2D_Quit();	
 	exit(0);
 }
 
@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
 	GLES2D_InitDebugConsole();
 
 	/* Init openGL(ES) display in fullscreen with Full Screen Anti Aliasing */
-	if ( ! GLES2D_InitVideo( 800, 480, 1, 0, 0 ) )
+	if ( ! GLES2D_InitVideo( 800, 480, 1, 0, 0,VIDEO_X11 ) )
 		exitError("Error : GLES2D_InitVideoMode failed\n");
 
 	/* Load a ttf font in memory */
@@ -233,7 +233,7 @@ int main(int argc, char *argv[])
 	GLES2D_FreeFont( font ); font = NULL;
 
 	/* Quit properly... */
-	GLES2D_QuitVideo();
+	GLES2D_Quit();
 
 	return 0;
 }
diff --git a/examples/pvrtc/main.c b/examples/pvrtc/main.c
index 9e9ec65..f5022c6 100644
--- a/examples/pvrtc/main.c
+++ b/examples/pvrtc/main.c
@@ -23,7 +23,7 @@ void handleEvents()
 
 int main( int argc, char *argv[] )
 {
-	if ( ! GLES2D_InitVideo( 800, 480, 0, 0, 0) )
+  if ( ! GLES2D_InitVideo( 800, 480, 0, 0, 0, VIDEO_X11) )
 		exit(0);
 
 /*

I still experimenting the same (I guess) problem Lozrus had : keystokes via GLES2D_KeyboardHold aren't working I'm going to investigate
 
W00t, sorry mikerodd i did a lot of changes recently in GLES2D. I removed SDL 1.3 for rendering and didn't took the time to rewrite all the functions ( specially sprite/collision/tilemaps stuff ). I need to work on pmenu right now but i'll try to fix that soon (a month maybe .. )


mikerodd said:
Thanks dflemstr,

I installed this SDK and compile was OK after some minor changes. I'm not familiar with git but here's what git-diff outputed :

Code:
diff --git a/examples/demo/main.c b/examples/demo/main.c
index ad27d3c..e65cdcc 100755
--- a/examples/demo/main.c
+++ b/examples/demo/main.c
@@ -39,7 +39,7 @@ void exitError ( char *errormsg )
 	GLES2D_TilesMapFree();
 	GLES2D_FreeFont( font ); font = NULL;
 
-	GLES2D_QuitVideo();	
+	GLES2D_Quit();	
 	exit(0);
 }
 
@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
 	GLES2D_InitDebugConsole();
 
 	/* Init openGL(ES) display in fullscreen with Full Screen Anti Aliasing */
-	if ( ! GLES2D_InitVideo( 800, 480, 1, 0, 0 ) )
+	if ( ! GLES2D_InitVideo( 800, 480, 1, 0, 0,VIDEO_X11 ) )
 		exitError("Error : GLES2D_InitVideoMode failed\n");
 
 	/* Load a ttf font in memory */
@@ -233,7 +233,7 @@ int main(int argc, char *argv[])
 	GLES2D_FreeFont( font ); font = NULL;
 
 	/* Quit properly... */
-	GLES2D_QuitVideo();
+	GLES2D_Quit();
 
 	return 0;
 }
diff --git a/examples/pvrtc/main.c b/examples/pvrtc/main.c
index 9e9ec65..f5022c6 100644
--- a/examples/pvrtc/main.c
+++ b/examples/pvrtc/main.c
@@ -23,7 +23,7 @@ void handleEvents()
 
 int main( int argc, char *argv[] )
 {
-	if ( ! GLES2D_InitVideo( 800, 480, 0, 0, 0) )
+  if ( ! GLES2D_InitVideo( 800, 480, 0, 0, 0, VIDEO_X11) )
 		exit(0);
 
 /*

I still experimenting the same (I guess) problem Lozrus had : keystokes via GLES2D_KeyboardHold aren't working I'm going to investigate
 
Last edited by a moderator:
PhonicUK said:
Is there a way to build on 64-bit hosts?
No, you have to add "-m32" to every invocation of GCC in the Makefiles (which will "cross-compile" (not really) from x86_64 to i686)
 
Last edited by a moderator:
dflemstr said:
PhonicUK said:
Is there a way to build on 64-bit hosts?
No, you have to add "-m32" to every invocation of GCC in the Makefiles (which will "cross-compile" (not really) from x86_64 to i686)

I got that far but couldn't get it to link against 32 bit libs in /usr/lib32 instead of those in /usr/lib
 
Last edited by a moderator:
Back
Top