Sorry, I should have said "this fix" instead of "my fix"; someone else may have seen this, too, or I may have gotten the idea from someone else (directly, indirectly, or otherwise).
Thanks, D.J. On Mon, Dec 14, 2009 at 1:14 PM, D.J. Caldwell <[email protected]> wrote: > Greetings OpenSceneGraph/Qt users, > > I, also, noticed bad behavior (blinking and such) with the QOSGWidget > example code. It has been a while since I last worked with it, but I > believe that after digging around in the documentation and deep in the > source code that I (partially) corrected the problem by overriding the > virtual QWidget function, paintEngine: > > QPaintEngine* QOSGWidget::paintEngine () const > { > return 0; > } > > Check your documentation for QWidget::paintEngine, and then give my > suggestion a try; it seems to work for me. > > I am currently using OpenSceneGraph 2.8.2 with Qt 4.5.2 on 32 bit > Windows XP Professional. I am building my project with Visual Studio > 2005. I believe my fix may also work for linux users, but I haven't > tested it. > > Good luck... > > D.J. > > > On Mon, Dec 14, 2009 at 1:05 PM, Don Leich <[email protected]> wrote: >> 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 >> > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

