I have been following this tutorial: http://www.nps.navy.mil/cs/sullivan/osgtutorials/osgNodeMaskII.htm It uses masks to stop nodes from being displayed on one of the cameras. The example compiles but crashes so I was wandering if there's an 'official' OSG example showing how masks work?
thanks. On 3/5/07, Calin Negru <[EMAIL PROTECTED]> wrote:
I've solved my cursor problem but I got into another. I'm using two cameras and the GUI shows on both of them. I need the second viewport clear. http://calinnegru.googlepages.com/Badhud.jpg How can I have the HUD only in one viewport? On 3/5/07, Calin Negru <[EMAIL PROTECTED]> wrote: > > There is a spelling mistake in my original message that might make it > hard to understand, here's the corrected text: > > Please help me out with this. > My guess is the cursor node must be attached to the HUD Projection > Matrix. Now I will have to change the cursor position every time the mouse > is moved so I guess I will need to attach to the HUD Projection Matrix a > cursor movement matrix first. And then attach the cursor graphics node to > the cursor movement matrix node. I'd appreciate the input from someone that > has a better grasp on OSG than I. My HUD code so far is this: > > HUDProjectionMatrix->setMatrix > > > > (osg::Matrix::ortho2D(0,1024,0,768)); > > > > osg::MatrixTransform* HUDModelViewMatrix = new > > osg::MatrixTransform; > > HUDModelViewMatrix->setMatrix(osg::Matrix::identity()); > > > > HUDModelViewMatrix->setReferenceFrame(osg::Transform::ABSOLUTE_RF); > > rootNode->addChild(HUDProjectionMatrix); > > HUDProjectionMatrix->addChild(HUDModelViewMatrix); > > > > //Insert HUD controls > > > > HUDModelViewMatrix->addChild( HUDMainFrame ); > > > > // HUDModelViewMatrix->addChild( Cursor ); > > > > On 3/5/07, Calin Negru <[EMAIL PROTECTED]> wrote: > > > > Please help me out with this. > > My guess is the cursor node must be attached to the HUD Projection > > Matrix. Now I will have to change the cursor position every time the mouse > > is moved so I guess I will need to attach to the HUD Projection Matrix a > > cursor movement matrix first. And then attach the cursor graphics node to > > the cursor movement matrix node. I'd appreciate the input from someone that > > has a better grasp on OSG than I. My HUD code so far is this: > > > > > > HUDProjectionMatrix->setMatrix(osg::Matrix::ortho2D(0,1024,0,768)); > > > > osg::MatrixTransform* HUDModelViewMatrix = new > > osg::MatrixTransform; > > HUDModelViewMatrix->setMatrix(osg::Matrix::identity()); > > > > HUDModelViewMatrix->setReferenceFrame(osg::Transform::ABSOLUTE_RF); > > rootNode->addChild(HUDProjectionMatrix); > > HUDProjectionMatrix->addChild(HUDModelViewMatrix); > > > > //Insert HUD controls > > > > HUDModelViewMatrix->addChild( HUDMainFrame ); > > > > // HUDModelViewMatrix->addChild( Cursor ); > > > > -- > > Calin Negru > > > > > -- > Calin Negru -- Calin Negru
-- Calin Negru
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
