HI Emilo,
You can't switching of OpenGL clipping, you can only move the near and far
planes to encompass you model so it doesn't clip it - its the way that
graphics pipeline in hardware works. The OSG by default will automatically
compute the near and far planes to prevent clipping, but since you have
switched this off you are on your own, if its clipping then its because
you've set the wrong values.
Robert.
On Thu, Apr 10, 2008 at 1:15 PM, Emilio Lozano <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'`m trying to get a node always drawn without being affected by near
> clipping plane defined in projection perspective. With the following simple
> code what I expected to get is that the cow was not clipped by near or far
> planes, but the cow is still clipped.
>
> Could you give me any hints?
>
> Thanks in advance to all.
>
> int main( int argc, char **argv )
> {
> osg::ArgumentParser arguments(&argc,argv);
>
> osg::Node* loadedModel = osgDB::readNodeFile("cow.osg");
>
> // Although set as not culled, the model is still culled by near/far
> planes
> loadedModel->setCullingActive (false);
>
> osg::Group* rootnode = new osg::Group();
> rootnode->addChild (loadedModel);
>
> // run optimization over the scene graph
> osgUtil::Optimizer optimzer;
> optimzer.optimize(rootnode);
>
> osgViewer::Viewer viewer;
> viewer.setUpViewInWindow (100, 100, 800, 600, 0);
>
> // set the scene to render
> viewer.setSceneData(rootnode);
>
> viewer.getCamera ()->setProjectionMatrixAsPerspective (30.0, 40.0 /
> 30.0, 50.0, 2000.0);
> viewer.getCamera ()->setComputeNearFarMode
> (osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
>
>
> return viewer.run();
> }
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org