AnsweredAssumed Answered

i.MX6Q Dual-Display with EGLFS & OpenGLES 2.0/3.0

Question asked by Richard Thompson on Dec 14, 2015

I have a Qt 5.4 application that needs to render OpenGLES content to two screens (HDMI and LVDS).

Linux, Qt Embedded using EGLFS.


Unfortunately, Qt 5.4 still only supports a single screen per application via EGLFS.


At the moment, the only way I have found to do this is to render the 2nd screen into an offscreen OpenGLES Framebuffer Object, then use glReadPixels() to get the secondary screen content into Linux shared memory, then a second Qt application targeting the other screen framebuffer re-uploads and draws it.


This is of course extremely slow.

This technique gives me get 5-6fps, compared to 50-60fps if I still render everything but skip glReadPixels().


Is there any way to have one application with shared eglfs/OpenGLES contexts directed at two output framebuffers?


Secondly, I would like to create the shared contexts and inject them into Qt.

Is this possible, and if so, how can I do it?