Robert Osfield wrote:
Hi Tugkan,
You shoudl be able to disable the near far compute by doing:
viewer.getCamera()->setComputeNearFarMode(osg::CullSettingts::DO_NOT_COMPUTE_NEAR_FAR)
I've tried it. It doesn't work.
Just to be sure I've tried it inside osgviewer.cpp as follows
.
.
.
viewer.setSceneData( loadedModel.get() );
viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
printf("nf mode:%i\n" , viewer.getCamera()->getComputeNearFarMode());
return viewer.run();
.
.
.
It didn't work here also. printf prints 0 which is
CullSettings::DO_NOT_COMPUTE_NEAR_FAR.
As osg::Camera inherits from CullSettings.
Robert.
On 2/20/07, Tugkan Calapoglu <[EMAIL PROTECTED]> wrote:
Hi,
I have a viewer class which is derived from osgViewer::Viewer. I am
trying to disable automatic near-far calculation for this class and it
works only if I override the frame() method and call
setComputeNearFarMode(osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR)
every frame for all scene views.
Is it supposed to be so? I've tried calling the above method in the
c'tor for scene viewers and cameras but it did not work.
Note: I am using latest SVN version (an hour or so old) on Suse9.3
Tugkan
-------------------------------------
VIRES Simulationstechnologie GmbH
Oberaustrasse 34
83026 Rosenheim
Germany
phone +49.8031.463640
fax +49.8031.463645
email [EMAIL PROTECTED]
internet www.vires.com
-------------------------------------
Sitz der Gesellschaft: Rosenheim
Handelsregister Traunstein HRB 10410
Geschaeftsfuehrer: Marius Dupuis
Wunibald Karl
-------------------------------------
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
--
Tugkan Calapoglu
-------------------------------------
VIRES Simulationstechnologie GmbH
Oberaustrasse 34
83026 Rosenheim
Germany
phone +49.8031.463640
fax +49.8031.463645
email [EMAIL PROTECTED]
internet www.vires.com
-------------------------------------
Sitz der Gesellschaft: Rosenheim
Handelsregister Traunstein HRB 10410
Geschaeftsfuehrer: Marius Dupuis
Wunibald Karl
-------------------------------------
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/