PDA

View Full Version : QGLWidget with overlay



pandora-qt
29th February 2008, 10:44
Is it possible to clarify how to create a QGLWidget with an overlay? As I understand if overlays are supported an overlay context is created too.
I have enabled overlays in hardware:

> glxinfo
...
0x23 16 tc 1 16 1 r y . 5 5 5 0 4 0 0 16 16 16 16 0 0 None
0x5a 16 tc 1 16 1 r . . 5 5 5 0 4 0 0 16 16 16 16 0 0 None
0x5b 16 tc 1 16 1 r y . 5 5 5 0 4 24 0 16 16 16 16 0 0 None
0x5c 16 tc 1 16 1 r . . 5 5 5 0 4 24 0 16 16 16 16 0 0 None

> xprop -root
...
...
SERVER_OVERLAY_VISUALS(SERVER_OVERLAY_VISUALS) = 0x23, 0x1, 0x0, 0x1, 0x5a, 0x1, 0x0, 0x1, 0x5b, 0x1, 0x0, 0x1, 0x5c, 0x1, 0x0, 0x1

I never seem to be able to query that a GL widget has an overlay despite asking for it.
Is it common to therefore use perhaps QGLContext::chooseVisual() in a subclass?
Attached a simple example that might highlight what I'm missing? I am testing overlay support with QGLFormat::hasOpenGLOverlays() which returns true.

Thanks.