⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

Problems showing widgets with transparent background over OpenGL drawings in WinCE

  • Hello,

    I'm creating an application on WinCE platform with Qt 5.2.1 which needs to contain:

    • OpenGL 3D building drawings (executed by third party library).
    • Some screens that have transparent background with some widgets (buttons, labels, etc.) on top of the OpenGL drawings.

    I get some difficulties to get this working properly. Until this moment I have tried two kinds of solution:

    Using 2 windows.

    One window solely for the OpenGL drawings using QGLWidget and another (frameless) window with transparent background for the screens containing control widgets (buttons etc.), then put them together at the same position with same size where the QGLWidget is behind the other window.
    This works properly in Windows 7 desktop but not in WinCE. In WinCE it completely makes everything transparent, not only the background and not only on one window. The end result is nothing is visible :/

    Using QGraphicsView and QGraphicsScene.

    The OpenGL drawings are done as part of QGraphicsScene::drawBackground() and the screens (big widgets) which contains the control widgets are added to the QGraphicsScene with QGraphicsScene::addWidget().
    This works properly if I do my own simple OpenGL rectangles and lines drawings but not if the third party library is used. It does some 2D texture rendering but for some reason the color is not drawn (only black). I know that it will first render the 3D buildings into some frame buffer object so maybe related to the FBO management in QGraphicsView.
    When tested in Win7 it gives the same result but shows red (with diverse red value) instead of completely black.

    On solution-1, for the frameless transparent window I used:

    Anyone has any clue where might it go wrong on the above solutions, or perhaps another solution idea?

Log in to reply