maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Finally: GL to GLES runtime (glshim from openpandora) (https://talk.maemo.org/showthread.php?t=90922)

nokiabot 2013-08-02 04:51

Re: Finally: GL to GLES runtime (glshim from openpandora)
 
keep the ***** on:)

szopin 2013-08-02 09:55

Re: Finally: GL to GLES runtime (glshim from openpandora)
 
Quote:

Originally Posted by AapoRantalainen (Post 1364330)
Yes, https://github.com/lunixbochs/glshim/issues/13


I see these errors when quitting/ending, https://github.com/lunixbochs/glshim/issues/15

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)

Got it working with a bit of playing with folders (unsquashed pnd from pandora, their config file was useful). Textures work, but sadly at 800x480 getting only 4-5 fps (even less on maps with mazes): With ping in the 200s on 3g would be fun. Too bad Jolla is going with wayland, we could use that double-core

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

freemangordon 2013-08-02 10:21

Re: Finally: GL to GLES runtime (glshim from openpandora)
 
Quote:

Originally Posted by szopin (Post 1364414)
Got it working with a bit of playing with folders (unsquashed pnd from pandora, their config file was useful). Textures work, but sadly at 800x480 getting only 4-5 fps (even less on maps with mazes): With ping in the 200s on 3g would be fun. Too bad Jolla is going with wayland, we could use that double-core

Hmm, 4-5 fps is too low IMO, are you sure it is really accelerated? You can grab PVRTrace and PVRTool to trace GL calls and see WTF is going on.

AapoRantalainen 2013-08-03 20:22

Re: Finally: GL to GLES runtime (glshim from openpandora)
 
Quote:

Originally Posted by freemangordon (Post 1364422)
You can grab PVRTrace

Can you very briefly tell what is pvrtrace and where it can be grabbed? Is it used same way as 'trace' i.e. I need arm binary for Maemo5 and put it to the device?

freemangordon 2013-08-03 22:46

Re: Finally: GL to GLES runtime (glshim from openpandora)
 
Quote:

Originally Posted by AapoRantalainen (Post 1364737)
Can you very briefly tell what is pvrtrace and where it can be grabbed? Is it used same way as 'trace' i.e. I need arm binary for Maemo5 and put it to the device?

PVRTrace and PVRTool are part of Imagination's PowerVR SDK:

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]
EglLibraryPath = /usr/lib/libEGL.so
Es1LibraryPath = /usr/lib/libGLES_CM.so
Es2LibraryPath = /usr/lib/libGLESv2.so
[record]
TraceFile = /home/user/MyDocs/tmp/trace-%pid.pvrt
RecordData = 1
StartFrame = 1
EndFrame = 10
;Network = 1
;NetworkSendData = 1

Change EndFrame according to your needs. Also make sure /home/user/MyDocs/tmp dir exists ;)

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
On windows the trace libs for N900 are in Imagination\PowerVR\GraphicsSDK\PVRTrace\Recorder\ Linux_armv7, too lazy to power the laptop up to check where are they located no Linux, but I am sure you'll figure it out if needed.

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.

AapoRantalainen 2013-08-05 22:35

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).

Android_808 2013-08-06 07:01

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?

MartinK 2013-08-06 09:37

Re: Finally: GL to GLES runtime (glshim from openpandora)
 
Quote:

Originally Posted by Android_808 (Post 1365176)
great work. vid of armagetron looks very smooth.

just wondering what other titles we could now try porting?

Frets on fire ? :)

HtheB 2013-08-06 13:54

Re: Finally: GL to GLES runtime (glshim from openpandora)
 
Blender? :p

taixzo 2013-08-06 15:29

Re: Finally: GL to GLES runtime (glshim from openpandora)
 
Quote:

Originally Posted by HtheB (Post 1365251)
Blender? :p

Oh, I am hoping for this. Someone made a GL->GLES header file a ways back (4 years ago) and posted a video of Blender running smoothly on the N900...but then it vanished and I could only ever find a software GL version.

Not that Blender would necessarily be useful, but...to be able to say, "well, my phone can run Blender!" is fun. :cool:


All times are GMT. The time now is 19:08.

vBulletin® Version 3.8.8