![]() |
Finally: GL to GLES runtime (glshim from openpandora)
This is developer sneak peak for glshim (https://github.com/lunixbochs/glshim) by lunixbochs.
If you haven't read (open)pandoralive (http://www.pandoralive.info/?p=1533), glshim is runtime translation from GL 1.x to GL ES 1.x which means openGL games can be run with openGLES-hardware (without modifications, just recompilation). Library is experimental even on Pandora and very experimental for Maemo5, but I think this is the rigth moment to keep noise about it. Take glshim. Compile glshim under scrathbox. Get libGL.so.1. Compile unmodified GL-game against it *. Copy game and library to the device. -> profit (check video, Bloboats on n900): http://youtu.be/ZHJ2I8rePmI * Fix problems. E.g. (bloboats) gluOrtho2D(0, width, 0, height); -> glOrtho(0, width, 0, height,-1.0,1.0); Issues at this moment (01 Aug 2013): *sometimes at the start screen is messed (big blocks) *when screen dims, screen will be messed (big blocks) Remember: If game is using SDL: -SDLK_RETURN +SDLK_RETURN or SDLK_KP_ENTER (and do something about SDLK_ESCAPE) Talk on openpandora-forum: http://boards.openpandora.org/index....dr-more-games/ Talk on rasberry-forum: http://www.raspberrypi.org/phpBB3/vi...45252&p=395110 ----- EDIT: You need this for glu-functions: https://github.com/lunixbochs/glues Next video: (blending test from nehe) http://youtu.be/lsS8QlO11us Code:
wget http://nehe.gamedev.net/data/lessons/linuxsdl/lesson08.tar.gz |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Awesome! :D
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
WOW!!! Does this mean finally armagetron on N900? :D Awesome. So many games/progs are now open to porting. YAY!
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
This is awesome! I'll have to compile this in scratchbox and check it out tonight though the idea isn't exactly new. I'm more interested in the performance and compatibility.
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Keep the N900 going
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
something to rebuild for harmattan too :)
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
Code:
[3|user@Nokia-N900|~/libs/armagetronad-0.2.8.3.2]./armagetronad_main |
Re: Finally: GL to GLES runtime (glshim from openpandora)
1 Attachment(s)
Quote:
Quote:
I got armagetron's menus working. Gameplay area is black, but texts top on game are working. (using this https://github.com/lunixbochs/glues and dropping SDL_WM_SetIcon for keyboard focus) |
Re: Finally: GL to GLES runtime (glshim from openpandora)
The link from 1st post mentions arma as working with screenshot, so I'm hopeful. Time to learn wm_seticons of GL
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
**** That N9 And Please Keep Working On N900, Keep it Up Guyssss. Goooood Luckkkkkk, May Gos Bless Ya'll
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
keep the ***** on:)
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
EDIT: Thanks freeman, it was indeed mesa GLU (libGLU.so needed '.1') + libGL, with proper GLU (from github glues) getting same black screen in game :( at least the fps are now >40 |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
http://www.imgtec.com/powervr/insider/pvrtrace.asp http://www.imgtec.com/powervr/inside...vr-pvrtune.asp Latest versions work pretty much OK with N900, though you'll need recent OpenGL support on your desktop for PVRTrace frame analysis to work(I was unable to do it on my WindowsXP machine). I use the following pvrtrace.cfg: Code:
[host] To capture a trace for a particualr program, copy the libs into the dir the traced binary is, create pvrtrace.cfg in the same dir with the above content and use: Code:
LD_PRELOAD="./libEGL.so ./libGLESv2.so ./libGLES_CM.so ./libPVRTrace.so" ./$BINARY For PVRTune you need to copy PVRPerfServerDeveloper on the device and run it. I found the default data capture period of 5ms(iirc) too low for my needs, so I used 30ms, but I guess it depends on the tuned program(I used it against gecko :) ) All tools that come with the SDK have good documentation, however, if you need any further instructions I'll gladly try to help, just ask. EDIT: The above LD_PRELOAD is for GLES2.0, for a different version maybe more or different trace libs need to be loaded. |
Re: Finally: GL to GLES runtime (glshim from openpandora)
I made packages to the extras-devel: libglshim-dev, libglushim-dev, libglshim, libglushim. And they are working as expected!
glshim is https://github.com/lunixbochs/glshim glushim is https://github.com/lunixbochs/glues/tree/glu (i.e. 'glu' branch in glues, this was cure for black armagetron). |
Re: Finally: GL to GLES runtime (glshim from openpandora)
great work. vid of armagetron looks very smooth.
just wondering what other titles we could now try porting? |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Blender? :p
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
Not that Blender would necessarily be useful, but...to be able to say, "well, my phone can run Blender!" is fun. :cool: |
Re: Finally: GL to GLES runtime (glshim from openpandora)
FooBillard?
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
blender? really? can you really imagine trying to use those menus? bragging only good if you can actually use it.
i was thinking more like porting of gl renderers for emulators, acceleration in app rendering, webgl, classic games (foobilliard, as suggested, if it runs ok would be cool), engines like irrlicht to help with new games..... |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Its off-topic, but I'll just add that I've managed to start JOSM on N900 once. Not really usable, but it run. :)
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Version glishim=0.1-maemo3 (on extras-devel) works with already existing freeglut3 (in this case 'works'='compiles and can executed').
Quote:
Trick is not use 'make', but 'make GL', as source contains many targets, but we only need/use GL. Today code on git might compile another targets also. |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
But remember that you can connect the N900 to the TV with the TV-Out cable (although it wouldn't be 'on the go' anymore) Here is a video of Blender 2.5 Alpha running on the N900: http://www.youtube.com/watch?v=SriTyCtY1mE |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
But using pvrtrace affects running application. E.g. colours are different. I'm not sure how this affects for logs. |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Got Star Wars Jedi Knight: Jedi Academy to start a new game with correct graphics et al, this thing is awesome!! :)
Best lines in the log file: Code:
GL_VENDOR: Imagination Technologies |
Re: Finally: GL to GLES runtime (glshim from openpandora)
:eek: I guess performance wasn't great, but thats not the point - I'm as much impressed. Any special tweaks were required? I would like to try it myself.
BTW, where the hell have you got ARM build? /Estel |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
Well I have some problems, mainly I can only set the quality level to Very High (even if I explicitly tell it to load the low file, got about 0.5fps), have to run it windowed and have no keyboard input... so yeah, requires fixing :P I cloned this guy's git: https://github.com/xLAva/JediAcademyLinux He has a linux port from JA, though it is only x86 and not great quality code with some hacks in place; he has however improved widescreen support, which I thought was important. I had to port a couple of lines of ASM to c++ and play with some ifdef preprocessor macros to get it to choose 'unoptimized' c++ functions in favour of ASM. I also had to remove a couple of special fx (though honestly I haven't perceived the difference) plus a few cmake fixes and fix-along-as-compilation-errors-out procedure, might provide a patch once I iron out more errors and optimize the experience :) . oh and remove some x11 desktop code in favor of xrandr... but it works fine (sort of) :D |
Re: Finally: GL to GLES runtime (glshim from openpandora)
There's a full (and fast) GL ES / ARM NEON port for Jedi Knight Academy with source code on the Pandora forums.
http://boards.openpandora.org/index....3-jedi-academy |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Now install Movie Batlles (modification to jedi academy multiplayer) on top of it, and if it works on playable state, you're guaranteed to end up in every multiplayer gaming/tech gadgets blog in the net.
After all, why not? It is Q3 engine, afterwards, and Q3 itself worked well on N900. /Estel |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
That being said the port looks great, will look into it, thanks :) |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
|
Re: Finally: GL to GLES runtime (glshim from openpandora)
FYI, it does build on harmattan too
https://github.com/harmattan/glshim Will have to test it on device , I can release debs anyway just ask https://openrepos.net/content/rzr/libglshim |
Re: Finally: GL to GLES runtime (glshim from openpandora)
Quote:
There is Jedi Academy on pandora-forum (including links to the source code): http://boards.openpandora.org/index....-jedi-academy/ I have discussing there how to get it running properly on N900. I will announce it on on maemo-talk as soon there are something to play. And using it's NEON support needs gcc-4.8 (http://talk.maemo.org/showthread.php?t=90542). So it won't be in extras-devel (in a long time). |
Re: Finally: GL to GLES runtime (glshim from openpandora)
I pushed new version (0.1-maemo4) of libglshim to the extras-devel.
It should show: libGL: built on Jan 23 2014 19:12:17 [EDIT] I have tested valyriatear, armagetronad and bloboats. There were couple of commits on upstream from last autumn, not in Maemo's version. Main reason is there were one dependency missing on package. |
All times are GMT. The time now is 20:20. |
vBulletin® Version 3.8.8