Posts: 433
Joined: Sat Aug 18, 2012 5:58 pm

Possible to use OpenGL (not GLES) with a dispmanx context?

Wed May 18, 2016 6:54 pm


So I have been using GLES on a Dispmanx EGL context for years now, with very good results. Until now, I have been using the default Raspbian GLES libraries, which I believe are closed binaries.
However, with the advent of these OpenGL drivers, which are integrated in MESA I believe, it should be possible to use OpenGL on the Pi, and it should be theorically possible to do that without X, on a dispmanx context just like with EGL/GLES.
But I have yet to see a piece of code doing that. Is it possible at all? I don't use X11 on any of my projects, so I hope it is... :roll:

Posts: 433
Joined: Sat Aug 18, 2012 5:58 pm

Re: Possible to use OpenGL (not GLES) with a dispmanx contex

Thu May 19, 2016 9:19 am

Investigating a bit on the subject, I have found that it should be possibe to do

Code: Select all

instead of

Code: Select all

on a dispmanx context.
However, trying to install the MESA stuff yields a lot of (undesired) X11 dependencies.
What's the minimum set of packages needed to get accelerated OpenGL on the Pi without X11?
Again... is it possible at all?

I have also found that MESA can be built without X11 dependencies so it uses an fbdev EGL context instead: ... ithout-x11

So building MESA without X11 EGL support would be the way to go here, I guess. Its it possibe at all? Is there a --with-egl-platforms=dispmanx configure option? I can't see any mention to dispmanx on mesa's git code...

Maybe using EGL in /opt/vc is the way to go for the EGL part (create a dispmanx EGL context, etc) then I can use the OpenGL (NOT GLES) driver with that EGL context, but the question remains: What OpenGL libs/includes do I need?

Posts: 91
Joined: Fri Jan 10, 2014 8:31 am

Re: Possible to use OpenGL (not GLES) with a dispmanx contex

Mon Jun 06, 2016 3:03 pm

I'm not a OpenGL guru, but aren't OpenGLES a subset of OpenGL?

Actually what I've seen is that broadcom provides EGL, OpenGLES and OpenVG libraries and the can render only to framebuffer.

Opensource driver instead, but I can be wrong, should be able to render only to X11 windows via OpenGL (or OpenGLES)

Return to “Graphics programming”