Gibble
Posts: 56
Joined: Wed May 09, 2012 9:52 am

Re: Emulating Pi OpenGL ES

Sat May 12, 2012 4:00 pm

Hi,

I wanted to play about with OpenGL a little. I have tested the opengles test code from another site which looks to work fine on the Pi itself.

I can't access the Pi all the time (as its on the TV!), so I was trying to find a solution where I could test some Python opengles stuff for example, getting it running, then test it on the live Pi when I have access. Hope that makes sense.

I downloaded a virtualbox image, which basically works for most stuff, but doesn't for opengl, I'm guessing as it doesn't have 3d acceleration in there ?

libbcm_host.so: cannot open shared object file, is the main error.

Is there any simple solution to what I want to do ? (develop opengles elsewhere that will later work on the pi)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: Emulating Pi OpenGL ES

Sat May 12, 2012 6:42 pm

I've had quite a bit of success do exactly what you want, just by installing the x86 MESA OpenGL ES libraries on a Ubuntu distribution rather than an emulated Raspi. Code should be 99% cross compilable.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
ArborealSeer
Posts: 300
Joined: Tue Jan 24, 2012 9:48 am
Location: South West, UK

Re: Emulating Pi OpenGL ES

Mon May 14, 2012 2:53 pm

there's also the approach i'm using, which is one of the opengl es layers over opengl on windows.. however that obviously brings in a requirement for a whole bunch of other platform specific code - the samples that came with the "mali" api's i'm using were #ifdef'd nicely for linux and windows though..

i do plan to use debian/ubuntu/something in virtualbox to make my projects "pi ready" once they're at a suitable point
Pi Status > Farnell, Arrived 24/5- RS, Arrived 1/6

dattrax
Posts: 52
Joined: Sat Dec 24, 2011 5:09 pm

Re: Emulating Pi OpenGL ES

Mon May 14, 2012 8:42 pm

I use ANGLE for all my ES development. Works quite well. The only thing it doesnt support is compressed textures.

Jim

Pickle
Posts: 68
Joined: Tue Sep 20, 2011 5:09 pm

Re: Emulating Pi OpenGL ES

Tue May 15, 2012 2:24 pm

The biggest difference is using EGL, but thats just to get a surface going and not necessary to test OpenGL code. But if you use mesa it provides EGL and GLES libraries.

You can even use normal desktop OpenGL for testing OpenGL-ES code if you restrict yourself within the GLES API. There are minor differences i.e like glClearDepth (GL) glClearDepthf (GLES)

For OpenGL-ES 2.0 the only difference for shaders ive come across is the need for "precision mediump float;" to be defined at the beginning of the shader code.

There are other alternatives such OpenGL-ES simulators, i believe AMD has one.

Return to “Beginners”