Added support for CullVisitor::clampProjectionMatrixCallback
This commit is contained in:
@@ -251,12 +251,12 @@ bool _clampProjectionMatrix(matrix_type& projection, value_type& znear, value_ty
|
||||
}
|
||||
|
||||
|
||||
bool CullVisitor::clampProjectionMatrix(osg::Matrixf& projection, value_type& znear, value_type& zfar) const
|
||||
bool CullVisitor::clampProjectionMatrixImplementation(osg::Matrixf& projection, double& znear, double& zfar) const
|
||||
{
|
||||
return _clampProjectionMatrix( projection, znear, zfar, _nearFarRatio );
|
||||
}
|
||||
|
||||
bool CullVisitor::clampProjectionMatrix(osg::Matrixd& projection, value_type& znear, value_type& zfar) const
|
||||
bool CullVisitor::clampProjectionMatrixImplementation(osg::Matrixd& projection, double& znear, double& zfar) const
|
||||
{
|
||||
return _clampProjectionMatrix( projection, znear, zfar, _nearFarRatio );
|
||||
}
|
||||
|
||||
@@ -424,12 +424,14 @@ void SceneView::cull()
|
||||
if (!_renderStageRight.valid()) _renderStageRight = dynamic_cast<RenderStage*>(_renderStage->clone(osg::CopyOp::DEEP_COPY_ALL));
|
||||
|
||||
_cullVisitorLeft->setDatabaseRequestHandler(_cullVisitor->getDatabaseRequestHandler());
|
||||
_cullVisitorLeft->setClampProjectionMatrixCallback(_cullVisitor->getClampProjectionMatrixCallback());
|
||||
_cullVisitorLeft->setTraversalMask(_cullMaskLeft);
|
||||
cullStage(computeLeftEyeProjection(_projectionMatrix),computeLeftEyeView(_viewMatrix),_cullVisitorLeft.get(),_rendergraphLeft.get(),_renderStageLeft.get());
|
||||
|
||||
|
||||
// set up the right eye.
|
||||
_cullVisitorRight->setDatabaseRequestHandler(_cullVisitor->getDatabaseRequestHandler());
|
||||
_cullVisitorRight->setClampProjectionMatrixCallback(_cullVisitor->getClampProjectionMatrixCallback());
|
||||
_cullVisitorRight->setTraversalMask(_cullMaskRight);
|
||||
cullStage(computeRightEyeProjection(_projectionMatrix),computeRightEyeView(_viewMatrix),_cullVisitorRight.get(),_rendergraphRight.get(),_renderStageRight.get());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user