OK I found a solution to what I was trying to achieve.
I stopped using a 2nd HUD camera, because I couldn't figure out the proper 
projection with the resizable QT dialog.
Instead I added a Geode to my projector node (I forgot to mention in my 
previous post that the image is actually a projection of an image, and a 
modified version of the osgspotlight example).
In this added geode I draw the lines exactly above (and centered around) the 
projected image.
To make sure the crosshair lines overlay everything else in the scene, I turned 
off depth test, and used a transparent bin (similar to using an AutoTransform).
Code:

> xhairGeode->getOrCreateStateSet()->setMode(GL_DEPTH_TEST,osg::StateAttribute::OFF);
> xhairGeode->getOrCreateStateSet()->setRenderingHint( 
> osg::StateSet::TRANSPARENT_BIN );
> xhairGeode->getOrCreateStateSet()->setRenderBinDetails( 11, "RenderBin");


And now it works  :D , the crosshair is overlaid on the center of the 
projection.

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to