Hi,
I am building an application using OSGARt and I recently tried to use the
example: osgwidgetlabel to show some static labels on the viewer.
I followed the procedure as in the example and the labels were visible on the
screen. The problem is that my testcube vanished as if the tracker could not
recognize it on the webcam stream.
I found out that the camera was the problem, specifically the setup.
To enable the widgets I created a window manager and added the labels. Then I
used the code from the function createOrthoCamera.
osg::Camera* camera = new osg::Camera();
camera->getOrCreateStateSet()->setMode(
GL_LIGHTING,
osg::StateAttribute::PROTECTED | osg::StateAttribute::OFF
);
camera->setProjectionMatrix(osg::Matrix::ortho2D(0.0, width, 0.0f, height));
camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
camera->setViewMatrix(osg::Matrix::identity());
camera->setClearMask(GL_DEPTH_BUFFER_BIT);
camera->setRenderOrder(osg::Camera::POST_RENDER);
After the creation of the camera I used the standard procedure of OSGart,
meaning I added the tracker and the video stream.
camera -> addChild(arTransform.get());
camera -> addChild(videoBackground.get());
I know that the camera creation in OSGart must be done through the calibration
object -> osgART::Calibration
so I think it is normal that the OrthoCamera Settings cannot function
correctly.
Is there a way to make something like this to work?Does anyone know if there is
any documentation on the osgWidget objects? Any help would be appreciated.
Thank you for your time!
Stefanos
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43632#43632
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org