Thaddy
Posts: 173
Joined: Wed Mar 06, 2013 11:28 am

Re: 3D OpenGL games?

Sun Jun 09, 2013 9:53 am

ghans wrote:Hey cool. You're the first one which actually got
software rendering to work AFAIK. Obviously not of
much use on a 700MHz ARMv6 CPU.
ghans
Just FYI:
I got software rendering working with the Freepascal bindings some months ago. I think I posted that somewhere here on the forum and/or on the Freepascal forum. Steps are very similar to the above, though. FPS not very usable indeed.

ghans
Posts: 7854
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: 3D OpenGL games?

Sun Jun 09, 2013 10:11 am

Was this limited to your Apps or did it affect any software which
requires OpenGL ?
Do you have a link ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Thaddy
Posts: 173
Joined: Wed Mar 06, 2013 11:28 am

Re: 3D OpenGL games?

Sun Jun 09, 2013 10:53 am

This generally should work. I will post my setup sometime when I can access my pi's.

gfwilliams
Posts: 44
Joined: Thu Jun 14, 2012 8:29 am
Location: Cambridge

Re: 3D OpenGL games?

Tue Jul 16, 2013 4:13 pm

Just a quick note - I found this:

https://github.com/lunixbochs/glshim

Which emulates OpenGL in GLES1.

I haven't had a chance to try it on the Pi yet, but after some tweaks (here: https://github.com/gfwilliams/glshim) it plays supertuxkart and supertux2 really well on an ODroid board!

It even has a valiant attempt at rendering standard GL ioquake3, but doesn't manage to texture things correctly (I believe because of the lack of multitexturing). There seems to be an OpenGLES2 branch though, so hopefully multitexturing support will be coming soon!

ghans
Posts: 7854
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: 3D OpenGL games?

Wed Jul 17, 2013 6:47 am

There a quite a selection of projects like this scattered
around the net. Check my sixth post in this very thread ...


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

aegis
Posts: 9
Joined: Sat Jul 27, 2013 4:21 am

Re: 3D OpenGL games?

Sat Jul 27, 2013 5:06 am

ghans wrote:There a quite a selection of projects like this scattered
around the net. Check my sixth post in this very thread ...
I'm the author of glshim. On the Pandora, it's absolutely been possible to provide a fairly complete and fast fixed function OpenGL pipeline. We have many games/apps working and released using my library.

I've done decent research on the other projects available.

As far as I'm concerned there are only two active and promising projects in this space:
These projects are basically footnotes in my eyes: As a side note, I'm currently working on RPi support for glshim.

ghans
Posts: 7854
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: 3D OpenGL games?

Sat Jul 27, 2013 6:37 am

Hey , nice for you to pop by.
Just curious , what features of OpenGL can't be accelerated
by ES compatible hardware (in laymans terms , if possible :) )
I look forward to your results (would like to test) !

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

aegis
Posts: 9
Joined: Sat Jul 27, 2013 4:21 am

Re: 3D OpenGL games?

Sat Jul 27, 2013 7:07 am

In 1.x, it's mostly just stuff like reading from the depth buffer or registering clicks on objects in the scene.

Shaders will work fully in time, but that's a ways out.

Otherwise it's mostly just a speed difference. The ARM GPUs can only push so many pixels/triangles to the screen every frame.

It's working somewhat on my device now: http://bochs.info/img/IMG_0809-20130726-225909.jpg

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5242
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: 3D OpenGL games?

Sat Jul 27, 2013 10:56 am

aegis wrote:As a side note, I'm currently working on RPi support for glshim.
That is great news. I had a brief attempt at a GL shim about 5 years ago. I gave up when I got to display lists which the game I wanted to get running used.
So, I'm very interested to see what you can do.

aegis
Posts: 9
Joined: Sat Jul 27, 2013 4:21 am

Re: 3D OpenGL games?

Sat Jul 27, 2013 11:01 am

Well, it works :P http://www.youtube.com/watch?v=3YaQBVMMYWw

I ended up using code generation to facilitate display lists. There are quite a few other hard spots... like rewriting coordinates, swizzling textures, exposing a glX interface...

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5242
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: 3D OpenGL games?

Sat Jul 27, 2013 2:50 pm

aegis wrote:Well, it works :P http://www.youtube.com/watch?v=3YaQBVMMYWw

I ended up using code generation to facilitate display lists. There are quite a few other hard spots... like rewriting coordinates, swizzling textures, exposing a glX interface...
Are you able to use the standard binary bloboats from wheezy (replacing gl shared object with your shim), or do you need to rebuild with some custom initialisation?

aegis
Posts: 9
Joined: Sat Jul 27, 2013 4:21 am

Re: 3D OpenGL games?

Sat Jul 27, 2013 8:01 pm

My library hooks into the normal glX initialization used by desktop GL apps. The whole point to require no code changes whatsoever.

I compiled Bloboats myself on the Pi using MESA GL headers (this was in Arch). On the Pandora, I've been linking against MESA and running against my lib.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5242
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: 3D OpenGL games?

Sun Jul 28, 2013 11:14 am

aegis wrote:My library hooks into the normal glX initialization used by desktop GL apps. The whole point to require no code changes whatsoever.
Great, that's what I was hoping you'd say. So (on raspbian)

Code: Select all

sudo apt-get install glshim bloboats
./bloboats
could work in theory (with a suitable glshim deb file added to raspbian repo).

aegis
Posts: 9
Joined: Sat Jul 27, 2013 4:21 am

Re: 3D OpenGL games?

Sun Jul 28, 2013 5:38 pm

Not just a theory anymore. I just confirmed the Debian bloboats works fine with my shim. If you look at gfwilliams' fork, that's actually what he was doing (a .deb for the lib).

However, a version of bloboats with float precision instead of double would probably run a little faster ;)

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5657
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: 3D OpenGL games?

Sun Aug 04, 2013 3:31 pm

Hey aegis,

I've got oolite compiling and launching using the mesa libs, but having trouble compiling glshim.
http://bpaste.net/show/119906/

Was hoping you might be able to help.

Edit: Tried again with -D BCMHOST, but run into the same error. Noticed that libGL.so builds, so I tried using that, but no luck... fails to create a window. When I get the chance (not any time soon), I guess I should try bloboats to see if it works.

Edit2: I think I am starting to get the hang of it, but I am not sure if I am doing it right. Got bloboats running at about 10-20fps. Went back to oolite and am barely getting 1fps. If it helps, I have the log for oolite here.
http://bpaste.net/show/119927/

aegis
Posts: 9
Joined: Sat Jul 27, 2013 4:21 am

Re: 3D OpenGL games?

Sun Aug 04, 2013 7:42 pm

Bloboats should probably be higher sustained fps, and I don't think I get 1fps in even the worst games. run ldd to make sure you're not running against the Mesa libs.

my experience with oolite was just some broken rendering.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5657
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: 3D OpenGL games?

Mon Aug 05, 2013 2:30 am

Here is the ldd info for oolite using only libGL
http://bpaste.net/show/120028/

I noticed that although GL2 does not compile, I can still compile GLU and here is the ldd info after doing that.
http://bpaste.net/show/120029/

However, after launching with libGLU in place, I get undefined symbol errors (gluOrtho2D for bloboats and gluLookAt for oolite).

... so yeah, I think I am doing it wrong. :(

ssvb
Posts: 112
Joined: Sat May 19, 2012 6:15 pm

Re: 3D OpenGL games?

Sun Aug 18, 2013 10:58 am

gfwilliams wrote:Just a quick note - I found this:

https://github.com/lunixbochs/glshim

Which emulates OpenGL in GLES1.

I haven't had a chance to try it on the Pi yet, but after some tweaks (here: https://github.com/gfwilliams/glshim) it plays supertuxkart and supertux2 really well on an ODroid board!
Have you encountered this problem with supertuxkart?

Code: Select all

lib/irrlicht/libstkirrlicht.a(CIrrDeviceLinux.cpp.o): In function `irr::CIrrDeviceLinux::createWindow()':
CIrrDeviceLinux.cpp:(.text+0x2206): undefined reference to `glXCreateWindow'
lib/irrlicht/libstkirrlicht.a(CIrrDeviceLinux.cpp.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
CIrrDeviceLinux.cpp:(.text+0x2f01): undefined reference to `glXDestroyWindow'
lib/irrlicht/libstkirrlicht.a(CIrrDeviceLinux.cpp.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
CIrrDeviceLinux.cpp:(.text+0x3252): undefined reference to `glXDestroyWindow'
collect2: ld returned 1 exit status
And if yes, then how did you solve it? I just commented the calls to glXCreateWindow/glXDestroyWindow in supertuxkart's irrlicht internal copy (seems like they belong to a backend, which is not used by supertuxkart anyway) and it worked fine. But I wonder if there is a cleaner solution.

By the way, does your glshim fork still contain any useful fixes not yet merged in the aegis's github repository?

Hiradur
Posts: 96
Joined: Fri Mar 01, 2013 10:59 am

Re: 3D OpenGL games?

Fri Mar 14, 2014 5:22 pm

I wanted to try glshim on my RPi but I couldn't get it to work. I downloaded precompiled libGL.so.1 and libGLU.so.1 from http://bochs.info/pnd/.gl/ and put them into $HOME/lib. After that I added

Code: Select all

export LD_LIBRARY_PATH="$HOME/lib"
to $HOME/.bashrc.

I tried Neverball and Bloboats but both of them can't find "matching GLX visual". Do I have to compile these libs for myself or am I doing something wrong?

//EDIT: Solved, LIBGL_FB=1 did it. Also see this nice tutorial on how to set up glshim:
http://www.raspberrypi.org/phpBB3/viewt ... 4&p=479445

GizmoTheGreen
Posts: 27
Joined: Mon Jul 16, 2012 12:39 pm

Re: 3D OpenGL games?

Thu Feb 05, 2015 9:05 pm

I wonder how full minecraft will run on a pi2 with this? :P

User avatar
DougieLawson
Posts: 35125
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: 3D OpenGL games?

Thu Feb 05, 2015 9:49 pm

It won't I've tried it.

It fails after the launcher runs because there's JNI code that gets downloaded.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a hippy & doctor free zone.

GizmoTheGreen
Posts: 27
Joined: Mon Jul 16, 2012 12:39 pm

Re: 3D OpenGL games?

Fri Feb 06, 2015 5:35 pm

1.8 might not work no, but older should (1.7? 1.6.4?), glshim has been used to run it before, on openpandora. it's barely playable though which is why I'm hoping the pi2 would be better.

Return to “Troubleshooting”