Hello, Christian. If you overload the virtual function, QOSGWidget::paintEngine, to return 0, you may see improvement. In the past, that is what has worked for me, and the option has been discussed in this list. Do a search on the archives for paintEngine and/or Qt paint for more detail. Also, check out the Qt documentation and source code for possible implications for your project.
I hope this helps... D.J. On Tue, Oct 5, 2010 at 10:58 AM, Christian Muggeridge <[email protected]> wrote: > Hi, > > The osgviewerQtWidget is built with the examples in OSG 2.9.9 to demonstrate > a Qt/OSG combination. The example loads 4 osg files in 4 separate views (in a > Qt window), grouped in a composite view. The example code requires the usage > of 3 classes: QOSGWidget, ViewQOSG and CompositeViewerQOSG. > > QOSGWidget derives from a QWidget object. > ViewQOSG derives from QOSGWidget and OSGViewer::View. > CompositeViewerQOSG derives from QWidget and OSGViewer::CompositeViewer. > > I am trying to simplify this example to only use the QOSGWidget/ViewQOSG > classes, as I don't require the functionality of the composite viewer. > However, it seems as though that the CompositeViewerQOSG contains a virtual > paintEvent, which handles the drawing of the OSG models. Thus, by eliminating > the composite viewer along with the paint event, when a model is loaded (e.g. > cow.osg), a solid black view persists in the area where the cow should load. > > My question is, to create a simple osg viewer in a Qt window WITHOUT the > composite viewer, will I need to reorganize the classes built in the example > file (e.g, cut out code, add new paintEvent etc.) to get a simplified example > working? Has anyone tried this with the OSG 2.9.9 example? > > Thank you! > > Cheers, > Christian > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=32402#32402 > > > > > > _______________________________________________ > 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

