Important: Please read the Qt Code of Conduct -

The boxes Qt example does not work on a remote display (with export DISPLAY)

  • Hello,
    I try to run the Qt OpenGL examples on a "machine-A",
    doing before an "export DISPLAY=machine-B:0.0" :
    All Qt OpenGL examples (2dpainting, framebufferobject, grabber, hellogl, textures, glhypnotizer, deform...) work fine on the remote X display but not the "boxes" example,
    it does not display the cubes at all, without any error message.

    The difference I noticed is that "boxes" is the only one Qt OpenGL example using Vertex Buffer Objects, so :

    • Does anybody would know there's an issue with Qt OpenGL on remote display ?
    • Is there a known limitation in Qt OpenGL using VBO on a distant display ?

    (I run the Qt examples 4.8 on a CentOS 5 machine)

    Thank you for your help !

  • Ok, I found the problem : the glbuffer class in boxes could be seen as a beta version of the later QGLBuffer class, implementing VBOs. It does not work with remote display. To make it work I "just" replaced GLBuffer by QGLBuffer and adapted the code to match with the low level OpenGL calls. Hope this helps if someone is confronted to the same problem. Good luck though, it wasn't an easy thing to do at all.

  • Lifetime Qt Champion


    Did you update the Qt 4 code, or are you using Qt 5 in that case ?

  • It's a little bit more complicated : my program is derivated from boxes, so we can found in it all the classes from boxes, including glroundedbox, using VBOs.
    GLRoundedBox uses VBOs from glbuffers.c, a boxes file, instead of QGLBuffers, the classic implementation of VBOs.
    So I created a simple Cube class, using VBOs from QGLBuffers, and replaced GLRoundedBox by Cube. Now, my program works on remote display, but I did not modified the code of boxes.
    I did not updated to Qt-5 because, sadly, it's one of tne constraints of my project to work with Qt-4.8.4. But I analysed the code of boxes in Qt-5 to see if my bug was found and solved with the new version and found out that except for minor changes, the code is the same tnat in the 4.8.4 version. So I guess the same problem would happen if I used Qt-5.

  • Lifetime Qt Champion

    Then I you should go to the "bug report system": to see if it's something known

Log in to reply