mslinklater
Posts: 1
Joined: Sat May 26, 2012 8:42 pm

Windowed OpenGLES sample

Fri Jan 01, 2016 8:40 pm

Hi. I'm an experienced C++ graphics programmer but pretty dumb at Linux. Does anyone know of any sample code for the Pi to bring up a window in X with GLES running in it ?

Thanks

-rst-
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: Windowed OpenGLES sample

Wed Jan 06, 2016 2:50 pm

As far as I know, on the RPi there is no X to GL(ES) integration (like GLX) yet - the X window and the GLES 'window' need to be created separately and made to align in your application code (which might lead to the GLES to lag behind when dragging the X window - for example Minecraft seemed to suffer from this) or some sort of copy pixels from an EGL context to the X window must be implemented like https://github.com/PaulHaeberli/pi-eglonx (possibly slow).
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

mung
Posts: 506
Joined: Fri Nov 18, 2011 10:49 am

Re: Windowed OpenGLES sample

Sun Jan 10, 2016 10:23 pm

mslinklater wrote:Hi. I'm an experienced C++ graphics programmer but pretty dumb at Linux. Does anyone know of any sample code for the Pi to bring up a window in X with GLES running in it ?

Thanks
I think you may find it best to wait until the anholt drivers are released (rumours have it they should be around 1st quarter 2016)

Otherwise you will need to do a lot of work yourself working out color conversion or making sure the framebuffer is in correct BPP format.

I think you could check this thread viewtopic.php?f=63&t=74651&

Pablo Walters
Posts: 20
Joined: Sun Nov 27, 2016 6:21 am

Re: Windowed OpenGLES sample

Sun Nov 27, 2016 6:24 am

I just made this work again for Raspberry PI 3 Model B

It is a nice simple way to get OpenGLES2.0 running inside
a window when running PIXEL on RPI 3 Model B

https://github.com/PaulHaeberli/pi-eglonx

Return to “Graphics programming”