Maybe you could send your whole file. The code you inlined here seem
right.

Guy.

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Tuesday, April 08, 2008 2:51 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Two separated subgraphs, 2nd trial

 

Hi Oliver,

On Tue, Apr 8, 2008 at 1:13 PM, Oliver Kutter <[EMAIL PROTECTED]> wrote:

Hi,

isn't there anybody, who can answer my question (see below)?


I've just re-read you post and can't think of anything to say - as I
really don't know
what specifically is amiss.  I'd guess others don't know either.

Try providing a screen shot to tell us what looks wrong then we might be
able to help you.

Robert.
 

        
        regards
        Oliver
        
        Oliver Kutter schrieb: 

        Hi guys,
        
        I have a question concerning the openscenegraph example
"osghud". I have a similar scene like this example except that I don't
want to display hud text. Instead I want to render some small coordinate
system axes like the ones in 3d studio max in the left bottom corner.
        
        I still use openscenegraph 1.2, but I think this is not
important for my problem.
        
        Now my graph looks like this: I have a sceneview with a camera,
a root node and the main scene as a child of the root node.
        Now I constructed my stuff like the osghud example: I added a
new camera to the root node as a new subgraph and then I added my
coordinates system axes model as a child to that camera so that the axes
and the main scene are not connected.
        I set up the viewport of that camera (2nd viewport) to the left
bottom corner with size (100,100) similar to 3d studio max. Finally, my
axes are displayed in the 2nd viewport, but not in the main scene. That
is correct so far.
        
        Now my problem is that not only the axes but also the main scene
is displayed in the 2nd viewport. This shouldn't be like that because
the main scene is not a child of the 2nd camera.
        
        What am I doing wrong?
        
        These are my parameters which I set to the camera:
        osg::ref_ptr<osg::Node> _axes =
osgDB::readNodeFile("../data/osg/coordinate_axes.osg");
        
        _camera->setProjectionMatrix(osg::Matrix::perspective(50.0, 1,
0.1, 10000.0));
        _camera->setViewport(0,0,100,100);
        _camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
        _camera->setRenderOrder(osg::CameraNode::POST_RENDER);
        _camera->setClearMask(GL_DEPTH_BUFFER_BIT);
        
        _camera->addChild(_axes.get());
        _root->addChild(_camera.get());
        
        best regards,
        Oliver

        
        
        
________________________________



         
        _______________________________________________
        osg-users mailing list
        osg-users@lists.openscenegraph.org
        
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
          

        
        _______________________________________________
        osg-users mailing list
        osg-users@lists.openscenegraph.org
        
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g

 

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to