Best way to build an OpenGL overlay over multiple QGLWidgets?
-
I am writing an application for use on a large multitouch table. The idea is to organize the screen in cells / tiles of individual QWidgets or QGLWidgets. I organized the widgets with nested QVBoxLayouts / QHBoxLayouts. That all works fine.
!http://img197.imageshack.us/img197/7496/screen1z.png!
The example picture shows the different screen areas where each of the colored regions could be a simple QWidget or a QGLWidget.
My question know is how and if at all it is possible to have another OpenGL drawing area over the whole screen that overlays the individual areas?? I got it working just with QWidgets as explained here: "LINK":http://www.developer.nokia.com/Community/Wiki/Archived:How_to_overlay_QWidget_on_top_of_another. But as soon as I use a QGLWidget for either the overlay or the regions beneath it it doesn't work anymore.
The overlay should e.g. be used to render debugging information such as the touch points but also for visual drag and drop between the areas.
If there is no solution within QT how else would you accomplish this task? -
Why use separate QGLWidgets at all? Why not use one big one and render your tiles by adjusting glViewport() for each section. Then you don't need any special treatment for your "overlay" at all, other than resetting glViewport() to the full window/screen size.