Hi,
I use the QT Plugin for OSG to display some .flt files. Most of them are
looking normal but some are just strange. I think it hase something to do with
the Z Buffer but I'm not sure (Picture in the attachement).
The model is a child of a root node and the root ist assigend to the scene.
I also have a grid which is added as a child to the root. On models which are
correct there is no problem with it but on incorrect models the grid becomes
also incorrect. (Second attachment., the red cone is behind the model)
Code:
osg::ref_ptr<osg::Group> root = new osg::Group();
osg::Node* model =
osgDB::readNodeFile(m_entry->getRoot().toStdString(),options);
root.get()->addChild(model);
...
osg::Switch *switchGrid = new osg::Switch();
switchGrid->addChild(createGrid(box));
switchGrid->setValue(0,false);
root.get()->asGroup()->addChild(switchGrid);
m_osgWidget = new ViewerWidget(this); // Derrived from QGLWidget
m_osgWidget->setSceneData(root.get());
I hope someone can help me to fix this. In the osgviewer every model is
working correct and I don't know where my problem is.
...
Thank you!
Cheers,
Kevin
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51516#51516
Attachments:
http://forum.openscenegraph.org//files/trafficlight2_293.png
http://forum.openscenegraph.org//files/trafficlight1_140.png
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org