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