[Interest] compiling qt with eglfs

Thomas Senyk thomas.senyk at pelagicore.com
Wed Nov 7 18:20:08 CET 2012


On Wed, November 07, 2012 06:16:39 PM pritam.ghanghas at gmail.com wrote:
> On Wed, Nov 7, 2012 at 5:29 PM, Thomas Senyk 
<thomas.senyk at pelagicore.com>wrote:
> > On Wed, November 07, 2012 05:29:00 PM pritam.ghanghas at gmail.com wrote:
> > > Hi
> > > 
> > > I was trying to get qt working with eglfs + opengles.
> > > I am able to compile but when I try to run hellogl_es2. I get this.
> > > 
> > > ./hellogl_es2 -qws
> > 
> > No no no! :) No! :)
> > I can't stretch that enough: eglfs doesn't support this application!
> > 
> > Those plugins (eglfs, simplegl, minimalegl, kms,...) only support one(!)
> > fullscreen opengl-surface..
> > Therefor one can't mix QWidget-classes with QGLWidget (as it's the case
> > for
> > hellogl_es2)
> > 
> > How do I get the mix(QWidget + some QGLWidgets) working then? I need the
> 
> mix. I have a lot of
> code that is in QWidgets and I would like to use QGLWIdget incremently as
> and when I need it.
> I was previously using directfb. I enabled opengl without changing anything
> else, hellogl_es2 lauched
> but glWidget showed nothing, just some garbage probably due to not clearing
> the surface.
> So I swtiched to eglfs that resulted in the current scenario.

This is a hard limitation of eglfs.
It can't handle/composit multiple egl-surfaces and as the QGLWidget needs a 
egl-surface and you also having QWidgets around the QGLWidget which also need 
a surface you can forget about eglfs.


You need a proper windowing system for that kind of approach.
The 3 I know of:
- X11       (not embedded)
- directfb (not clue about the current state of the different directfb pluings)
- wayland (properly not available on your board)



Another long-term solution would be to switch to QtQuick(2.0)   ;)

> 
> > Take qmlviewer or similar and use QGLWidget as viewport for the
> > QGraphicsView/QDeclarativeView
> > (-opengl as argument for qmlviewer)
> > 
> > > QScreenLinuxFb::connect: No such file or directory
> > > Error opening framebuffer device /dev/fb0
> > > 
> > > : driver cannot connect
> > > 
> > > Aborted
> > > 
> > > I don't understand why it needs  /dev/fb0.
> > 
> > QWS != QPA
> > 
> > They are different, independent Qt ports.
> > They can't co-exist! You have to take one or the other!
> > 
> > 
> > eglfs is a platform plugin for QPA
> > Their is simplegl for QWS, but I got no clue about it's current state.
> > 
> > Me advice is to try QPA and eglfs as I know it's working.
> 
> So if I supply -qpa while configuring qt and copy my mkspec from qws to qpa
> dir, will i get working QPA?

Yes most likely!
 ... as long as you keep in mind that the plugins are also two distinct sets!
One set of plugins for QWS
Another set of plugins for QPA

> 
> > > Any Ideas what is wrong. This is with Qt 4.8.3.
> > > configure argument and output can be found here.
> > > http://pastebin.kde.org/598940/
> > > 
> > > I am comiling qt5 in parallel but results from that will take some time.
> > > Any ideas what is going wrong here.
> > 
> > You will not have that problem with qt5, as qws is gone ;)
> > 
> > great, lesser confusion :-).



More information about the Interest mailing list