I've run across the flickering problem before.  There seems to be various
side effects with certain Qt attributes, but I got better results changing
    setAttribute(Qt::WA_NoSystemBackground);
to
    setAttribute(Qt::WA_OpaquePaintEvent);
in QOSGWidget.cpp.

You can follow the thread below or dig up the "QOSGWidget demo with a 4-way
split window" I submitted for more help with Qt atttributes.

// Date: Tue, 16 Jun 2009 10:07:16 +0000
// From: "Eric Pouliquen" <[email protected]>
// Subject: Re: [osg-submissions] New QOSGWidget demo with a 4-way split
//         window        and bonus outboard window.
// Suggested replacing the two setAttribute calls with this...
//    setAttribute(Qt::WA_OpaquePaintEvent);
//  This solverd a flickering problem on Windows
//  8600 GT (185.85) and a Quadro FX1400 (182.65)
// but causes a visible black border to be visible in the rendering
// windows on Linux.  This problem gone when WA_PaintOnScreen
// is used in combination.

    // Hmmm...
    // According to Qt doc, WA_PaintOnScreen is X11 only and disables
    // double-buffering.  I think this just means it disables a
    // buffer swap under Qt control.  We want OSG to have full control.
    //
    // Equivalent to qt_x11_set_global_double_buffer(false)?
    //
    // Tried turning it off and got severe flashing on Linux.
    // Looks like without this we get an extraneous clear and
    // buffer swap form Qt.
    setAttribute(Qt::WA_PaintOnScreen);
    // This flags that something other than Qt is responsible for
    // all rendering in the window under the widget's control.
    setAttribute(Qt::WA_OpaquePaintEvent);
    // This seems superfluous now.
    // setAttribute(Qt::WA_NoSystemBackground);


-Don Leich


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to