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.
This commit is contained in:
parent
4600acb3b7
commit
1c9219560b
@ -591,11 +591,12 @@ void State::popAllStateSets()
|
|||||||
{
|
{
|
||||||
while (!_stateStateStack.empty()) popStateSet();
|
while (!_stateStateStack.empty()) popStateSet();
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
applyProjectionMatrix(0);
|
applyProjectionMatrix(0);
|
||||||
applyModelViewMatrix(0);
|
applyModelViewMatrix(0);
|
||||||
|
|
||||||
_lastAppliedProgramObject = 0;
|
_lastAppliedProgramObject = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void State::popStateSet()
|
void State::popStateSet()
|
||||||
@ -1282,7 +1283,6 @@ bool State::checkGLErrors(const StateAttribute* attribute) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void State::applyModelViewAndProjectionUniformsIfRequired()
|
void State::applyModelViewAndProjectionUniformsIfRequired()
|
||||||
{
|
{
|
||||||
if (!_lastAppliedProgramObject) return;
|
if (!_lastAppliedProgramObject) return;
|
||||||
@ -1469,8 +1469,6 @@ void State::applyModelViewMatrix(const osg::Matrix& matrix)
|
|||||||
loadModelViewMatrix();
|
loadModelViewMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <osg/io_utils>
|
|
||||||
|
|
||||||
void State::updateModelViewAndProjectionMatrixUniforms()
|
void State::updateModelViewAndProjectionMatrixUniforms()
|
||||||
{
|
{
|
||||||
if (_modelViewProjectionMatrixUniform.valid()) _modelViewProjectionMatrixUniform->set((*_modelView) * (*_projection));
|
if (_modelViewProjectionMatrixUniform.valid()) _modelViewProjectionMatrixUniform->set((*_modelView) * (*_projection));
|
||||||
|
Loading…
Reference in New Issue
Block a user