QGLWidget docking/undocking problem with PowerVR OpenGL ES 2.0

  • Hi,

    First of all, I don't know if my problem is related to Qt or the GLES2 driver I'm using (or maybe just with my program), but I thought I'd ask here first because I think the community is bigger here.
    I'm currently writing a program which uses one or more QGLWidgets to display a relatively simple 3D scene. Because I want to support lower resolutions, I decided to make the QGLWidgets (un)dockable, making them top-level widgets which can be viewed at higher sizes. I do this by putting all QGLWidgets in a container QWidget and then using setParent() on these container widgets (so I'm not reparenting the QGLWidgets themselves, but only their parents). I also want to support OpenGL ES 2.0 in addition to Desktop OpenGL 2.0, because I want my programs to run on the OMAP SoCs. With Desktop OpenGL, I didn't have any problems so far, but I can't get it to work on my Pandaboard.
    On my Pandaboard, I'm running GNU/Linux with a full X11 (so I'm using Qt/X11, not Qt Embedded; self-compiled version 4.7.2), and I use the PowerVR SGX 540 GPU with the official driver (GLES2). With this configuration, after I've docked and undocked a QGLWidget several times, the rendering stops and I get the following errors in the console, where the last message repeats endlessly:

    PVR:(Error): KEGLGetDrawableParameters: Can't get drawable params on 2nd attempt [1027, /generic_ws.c]
    QEglContext::makeCurrent( 0x604410 ): "Bad native window (0x300B)"
    QEglContext::swapBuffers(): "Bad surface (0x300D)"
    QEglContext::swapBuffers(): "Bad surface (0x300D)"
    QEglContext::swapBuffers(): "Bad surface (0x300D)"

    I put together a small test program with only a QGLWidget which can be docked and undocked using a button, where I can reproduce the error. When I run it in the PowerVR GLES2 emulator on my desktop machine, the error doesn't occur. I also compiled Mesa GLES2/EGL and run my program using Mesa software rendering on the Pandaboard: no error. Upon creating the QGLWidget, I also get the following warning, which might be related to this error (I don't know what it means):

    PVR:(Warning): InitContext: ignoring buffer type CBUF_TYPE_PDS_VERT_SECONDARY_PREGEN_BUFFER [777, /eglglue.c]

    As I've said, it might 'just' be a driver problem. Nevertheless, is there anybody who knows what's going on, or who can say that it's likely caused by some error in my program or in Qt? I've loaded the small test program up here, if there's anybody else with a PowerVR GPU on X11:


    Just compile (qmake && make) and run it, and dock/undock the GLWidget several times using the button. For me, three clicks are often enough to cause the error.

    Thanks in advance!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.