Introduced new uniforms for tracking the modelview and project matrices in shaders using non built-ins.
This commit is contained in:
@@ -54,7 +54,10 @@ void RenderLeaf::render(osg::RenderInfo& renderInfo,RenderLeaf* previous)
|
||||
state.apply(rg->getStateSet());
|
||||
|
||||
}
|
||||
|
||||
|
||||
// if we are using osg::Program which requires OSG's generated uniforms to track
|
||||
// modelview and projection matrices then apply them now.
|
||||
state.applyModelViewAndProjectionUniformsIfRequired();
|
||||
|
||||
// draw the drawable
|
||||
_drawable->draw(renderInfo);
|
||||
@@ -70,6 +73,10 @@ void RenderLeaf::render(osg::RenderInfo& renderInfo,RenderLeaf* previous)
|
||||
|
||||
state.apply(_parent->getStateSet());
|
||||
|
||||
// if we are using osg::Program which requires OSG's generated uniforms to track
|
||||
// modelview and projection matrices then apply them now.
|
||||
state.applyModelViewAndProjectionUniformsIfRequired();
|
||||
|
||||
// draw the drawable
|
||||
_drawable->draw(renderInfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user