From Wojciech Lewandowski, "1: fix for a issue with MinimalShadowMap and LightSpacePerspectiveShadowMapVB techniques ignoring minLightMargin parameter.
2: minor tweak for a DebugHUD drawn improperly case when multiple slave views shared one window. It now uses slave view viewport to correctly position DebugHUD. 3: deactivated ConvexPolyhedron notifications (they were accidentaly activated when you replaced osg::notify calls with OSG_NOTIFY macro). These warnings are useful only for shadow map developer working on shadow volume optimizations. So there is no sense in having them active all the time."
This commit is contained in:
@@ -391,8 +391,25 @@ void DebugShadowMap::ViewData::init( ThisClass *st, osgUtil::CullVisitor *cv )
|
||||
|
||||
_hudSize = st->_hudSize;
|
||||
_hudOrigin = st->_hudOrigin;
|
||||
_viewportSize = st->_viewportSize;
|
||||
|
||||
_viewportOrigin = st->_viewportOrigin;
|
||||
_viewportSize = st->_viewportSize;
|
||||
|
||||
osg::Viewport * vp = cv->getViewport();
|
||||
if( vp )
|
||||
{
|
||||
// view can be a slave that covers only a fraction of the screen
|
||||
// so adjust debug hud location to proper viewport location
|
||||
_viewportOrigin[0] += vp->x();
|
||||
_viewportOrigin[1] += vp->y();
|
||||
|
||||
if( _viewportSize[0] > vp->width() - _viewportOrigin[0] )
|
||||
_viewportSize[0] = vp->width() - _viewportOrigin[0];
|
||||
|
||||
if( _viewportSize[1] > vp->height() - _viewportOrigin[1] )
|
||||
_viewportSize[1] = vp->height() - _viewportOrigin[1];
|
||||
}
|
||||
|
||||
_orthoSize = st->_orthoSize;
|
||||
_orthoOrigin = st->_orthoOrigin;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user