[osg-users] ColorMask and depth information issue.

Alessandro Terenzi a.terenzi at gmail.com
Fri Aug 14 01:45:17 PDT 2015


Thank you Robert.
I will try to setup an example on a desktop computer.

Just to add more to the topic, I tried to call osg::Camera::getOrCreateStateSet()->setGlobalDefaults(); but nothing changed. And here's how I setup my camera (that is not the one coming from the viewer):


Code:
foreground_camera = new osg::Camera;
foreground_camera->getOrCreateStateSet()->setGlobalDefaults();
foreground_camera->setViewport(new osg::Viewport(0, 0, captureWidth, captureHeight));
foreground_camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
foreground_camera->setClearMask( GL_DEPTH_BUFFER_BIT );
foreground_camera->setRenderOrder(osg::Camera::POST_RENDER, 2);
foreground_camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
foreground_camera->setCullingMode(osg::CullSettings::NO_CULLING);



This camera is supposed to render objects on top of a video camera feed.

I am attaching also 2 simple boxes (osgt) one is correctly hidden the other is not.

Cheers,
Alessandro

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




Attachments: 
http://forum.openscenegraph.org//files/bnm_150.osg
http://forum.openscenegraph.org//files/bm_102.osg





More information about the osg-users mailing list