jars121
Posts: 78
Joined: Tue Jun 25, 2013 8:35 pm

OpenGL ES with EGLFS

Sun Oct 08, 2017 4:34 am

G'day,

I'm quite confused as to how OpenGL works on the RPi (RPi2 in my case), so I'm hoping those more knowledgeable than I could offer some insight. I've built and configured a custom Qt5 package on my EGLFS-based Raspbian Lite image (no X environment). My PyQt5 application works nicely for the most part, including the use of QOpenGLWidgets, which I believe use hardware-accelerated rendering as opposed to their rastered QWidget brothers.

I'm now trying to implement real-time plotting of a data stream. I've tried blitting with matplotlib, as well as standard plotting with pyqtgraph. Both are raster-based and cause the GUI to lock up, and can only offer a <1Hz refresh rate. From my weeks of research, discussions on forums and mailing lists, I've come to the conclusion that VisPy is the only solution. VisPy offers OpenGL hardware-accelerated plotting, which should provide the required refresh rates for real-time plotting on the RPi. The issue I'm having is that VisPy can't find my OpenGL libraries. Similarly, I can't run glxgears (Error: Couldn't open display (null)).

My assumption was the OpenGL ES 2.0 configured with my QT5 installation would be sufficient, but I've now tried using the in-built OpenGL option in raspi-config as well. I guess I'm just looking for some direction here; QOpenGLWidgets work as expected with the Qt5-configured OpenGL ES 2.0, but glxgears doesn't? Is there an issue here with EGLFS?

Any input/guidance would be greatly appreciated!

Thanks :)

User avatar
topguy
Posts: 3691
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: OpenGL ES with EGLFS

Mon Oct 09, 2017 3:27 pm

glxgears is a X-Windows application.
The experimental OpenGL drivers in "raspi-config" is also only mainly for X-Windows use. ( I might be wrong )

To utilize EGLFS best in Qt5 is (afaik) to use the QtQuick2 modules because it uses the SceneGraph for rendering.
http://doc.qt.io/qt-5/qtquick-visualcan ... graph.html

Most examples you will find is probably written in QML, but QtQuick2 can be used from C++ also.
http://doc.qt.io/qt-5/qtquick-module.html

They also have a collection of standard widgets.
http://doc.qt.io/qt-5/qtquickcontrols-index.html

Example QML dataplotter.
https://doc.qt.io/qt-5/qtcharts-qmlosci ... ample.html
http://www.arnorehn.de/blog/2014/12/qui ... lot-items/

Return to “OpenGLES”

Who is online

Users browsing this forum: No registered users and 4 guests