yeah, I have set setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); for the camera. Removing it did the work. Thanks for the hint Robert
Nick On Tue, Feb 11, 2014 at 9:02 PM, Robert Osfield <robert.osfi...@gmail.com>wrote: > Hi Nick, > > The callback is only called when you have enable the compute near far > mode. I don't recall the details off the top of my head, but I'd guess if > you have slave Camera's in action you'll need to attach to the Slave Camera. > > Robert. > > > On 11 February 2014 17:56, Trajce Nikolov NICK < > trajce.nikolov.n...@gmail.com> wrote: > >> Hi Community, >> >> Any insights how this works? I have inherited from this class and tried >> to set my computation of the znear/zfar but it seam it is not called. The >> code is like this: >> >> class MyClass : public osg::CullSettings::ClampProjectionMatrixCallback >> { >> ... >> bool clampProjectionMatrixImplementation(osg::Matrixf& projection, >> double& znear, double& zfar) const >> { >> znear = 1.0; >> zfar = 1000; >> return true; >> } >> // same for the double implementation >> >> then this callback is attached to the main camera, but it is not called >> ever >> >> Any clue? Thanks a bunch >> >> Nick >> >> -- >> trajce nikolov nick >> >> _______________________________________________ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- trajce nikolov nick
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org