[QtonPi] Qt Gles 2.0
Samuel Rødal
samuel.rodal at digia.com
Mon Oct 15 21:15:53 CEST 2012
On 10/15/2012 03:16 PM, Phil Thompson wrote:
> On Mon, 15 Oct 2012 14:49:07 +0200, Samuel Rødal <samuel.rodal at digia.com>
> wrote:
>> On 10/15/2012 02:25 PM, Eden Harris wrote:
>>> Hi. I admit, I have not written opengl es code before. When I looked
>>> through the source for hellowindow I saw some code that I thought was
>>> depreciated in gl 2.0 and so assumed it was gl 1.0.
>>>
>>> Hellogl_es only has the single window while the es2 example has as you
>>> say multiple top-level widgets. I am guessing this is why that example
>>> and my program is not working. Real shame if this is true as I really
>>> wanted something simple that would work on the pi and enable me to use
>>> all the functionality of qt's widgets with opengl.
>>
>> QML 2 lets you mix OpenGL with a QtQuick UI without having multiple
>> top-levels.
>>
>> But yeah, it would be nice if widgets + QGLWidget also worked with
>> eglfs. In theory we could support multiple top-level widgets even on
>> eglfs, either with a raspberry pi-specific solution taking advantage of
>> the layers there, or with a generic client side compositing solution.
>> Some hacky way of achieving the former shouldn't be too hard, but the
>> latter option would be a bit of work.
>>
>> hellogl_es2 might actually work if you use the wayland platform plugin
>> running it inside qwindow-compositor or qml-compositor (which themselves
>
>> would use eglfs and composite everything into a single fullscreen
> buffer).
>
> Do you mind explaining what the issues are here? I want my widget based
> application to run without needing X11 on the Pi. If this isn't possible
> then that suggests problems with the Qt5 architecture.
Eglfs is one of the platform plugins in Qt 5, where the fs stands for
fullscreen. It was originally meant to only support single-toplevel
fullscreen windows. The idea was that when you want to have compositing
of multiple native windows (either multiple top-level windows or a
window with a native child, such as a QGLWidget), you would use X11 or
Wayland. Eglfs would be useful to run the Wayland compositor, or to run
QML 2 applications directly without any windowing system.
This isn't really a limitation with the Qt 5 architecture, it's simply
an issue in how the eglfs platform plugin is currently implemented. As I
said, it would be possible to add client side compositing support to the
eglfs plugin, it would just require some work.
At the moment, widget based applications will also work with eglfs
assuming they only create one window and don't use any child QGLWidgets.
A top-level QGLWidget will also work fine.
--
Samuel
More information about the QtonPi
mailing list