[osg-users] problems with transparency in the QOsgWidget for QT

Mike Fried mike.fried at gmx.de
Tue Nov 10 06:03:29 PST 2009


Hi,

the problem is the osg::PositionAttitudeTransform node in the scene graph.

if i load s scene without the PAT node



Code:

osg::Group *root = new osg::Group();

grid3d *worldgrid = new grid3d(12,1.5);
root->addChild(worldgrid->get_grid3d_root());

osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile("Kugel_blau.dae");
root->addChild(loadedModel.get());




ViewerQT* viewerWindow = new ViewerQT;

viewerWindow->setCameraManipulator(new osgGA::TrackballManipulator);
viewerWindow->setSceneData(root);





the viewer show it right... but if i take a PAT node

Code:


osg::Group *root = new osg::Group();

grid3d *worldgrid = new grid3d(12,1.5);
root->addChild(worldgrid->get_grid3d_root());

osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile("Kugel_blau.dae");    
osg::PositionAttitudeTransform *position=new osg::PositionAttitudeTransform();

root->addChild(position);
position->setScale(osg::Vec3(0.01,0.01,0.01));
position->setAttitude(osg::Quat(1.57,osg::Vec3d(1.0,0.0,0.0)));
position->addChild(loadedModel.get());


ViewerQT* viewerWindow = new ViewerQT;

viewerWindow->setCameraManipulator(new osgGA::TrackballManipulator);
viewerWindow->setSceneData(root);




the viewer show no material on the spere??????

How can i fix the problem ??????

Thank you!

Cheers,
Mike[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19405#19405



-------------- next part --------------
A non-text attachment was scrubbed...
Name: good1.jpg
Type: image/jpeg
Size: 35123 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091110/12ffd33c/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bad.jpg
Type: image/jpeg
Size: 30216 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091110/12ffd33c/attachment-0003.jpg>


More information about the osg-users mailing list