Hi,
for some reason my Shadowed Scene won't display my HUD Camera, if I add the
Camera without the ShadowMap it works ine, but adding it disables the HUD for
no reason.
Help please!
Here is some reference:
Camera:
camera->setClearMask( GL_DEPTH_BUFFER_BIT );
camera->setRenderOrder( Camera::POST_RENDER );
camera->setReferenceFrame( Camera::ABSOLUTE_RF );
camera->setViewMatrixAsLookAt( Vec3(0.0f,0.0f, 1.0f), Vec3(), Vec3(0.0f,
1.0f, 1.0f) );
osg::StateSet* stateset = camera->getOrCreateStateSet();
stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF);
stateset->setMode(GL_DEPTH_TEST,osg::StateAttribute::OFF);
Shadowmap:
osg::ref_ptr<osgShadow::ShadowMap> sm = new osgShadow::ShadowMap;
sm->setLight( source.get() );
sm->setTextureSize( osg::Vec2s(1024, 1024) );
sm->setTextureUnit( 1 );
Thank you in advance!
Cheers,
Alex
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48468#48468
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org