From 1c9219560b3f696f257aeb42788a2d96ea0b08cd Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 3 Nov 2016 20:28:57 +0000 Subject: [PATCH] if'd 0 out resetting of the Projection and ModelView and Program object pointers in the popAllStateSets() as this was causing problems when using the RootStateSet. --- src/osg/State.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/osg/State.cpp b/src/osg/State.cpp index 9ec306123..dd6972a20 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -591,11 +591,12 @@ void State::popAllStateSets() { while (!_stateStateStack.empty()) popStateSet(); } - +#if 0 applyProjectionMatrix(0); applyModelViewMatrix(0); _lastAppliedProgramObject = 0; +#endif } void State::popStateSet() @@ -1282,7 +1283,6 @@ bool State::checkGLErrors(const StateAttribute* attribute) const return false; } - void State::applyModelViewAndProjectionUniformsIfRequired() { if (!_lastAppliedProgramObject) return; @@ -1469,8 +1469,6 @@ void State::applyModelViewMatrix(const osg::Matrix& matrix) loadModelViewMatrix(); } -#include - void State::updateModelViewAndProjectionMatrixUniforms() { if (_modelViewProjectionMatrixUniform.valid()) _modelViewProjectionMatrixUniform->set((*_modelView) * (*_projection));