Added explict call to state.applyModelViewAndProjectionUniformsIfRequired() when required for better GL3/GlES2 support.

remotes/origin/Deprecated_master_20th_November_2022
Robert Osfield 8 years ago
parent 5f407b3cc4
commit 44e303ad90

@ -1118,6 +1118,9 @@ void Text::drawImplementation(osg::State& state, const osg::Vec4& colorMultiplie
// ** apply this new modelview matrix
state.applyModelViewMatrix(modelview);
// workaround for GL3/GL2
if (state.getUseModelViewAndProjectionUniforms()) state.applyModelViewAndProjectionUniformsIfRequired();
// OSG_NOTICE<<"New state.applyModelViewMatrix() "<<modelview<<std::endl;
}
else
@ -1249,7 +1252,9 @@ void Text::drawImplementation(osg::State& state, const osg::Vec4& colorMultiplie
if (needToApplyMatrix)
{
// apply this new modelview matrix
state.applyModelViewMatrix(previous_modelview);
// workaround for GL3/GL2
if (state.getUseModelViewAndProjectionUniforms()) state.applyModelViewAndProjectionUniformsIfRequired();
}
}

Loading…
Cancel
Save