From 8cf1cc0dad156c79d1d9b051f2ee89bba81b65e3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 4 Feb 2004 09:30:06 +0000 Subject: [PATCH] From Brad Christaiansen, added check for projection matrix changing in screen coord character size mode. --- src/osgText/Text.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index d1dcf504d..5d5a4e6e5 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -718,6 +718,7 @@ void Text::drawImplementation(osg::State& state) const int frameNumber = state.getFrameStamp()?state.getFrameStamp()->getFrameNumber():0; AutoTransformCache& atc = _autoTransformCache[contextID]; const osg::Matrix& modelview = state.getModelViewMatrix(); + const osg::Matrix& projection = state.getProjectionMatrix(); osg::Vec3 newTransformedPosition = _position*modelview; @@ -741,7 +742,11 @@ void Text::drawImplementation(osg::State& state) const else if (width!=atc._width || height!=atc._height) { doUpdate = true; - } + } + else if (atc._projection!=projection) + { + doUpdate = true; + } } atc._traversalNumber = frameNumber; @@ -751,7 +756,7 @@ void Text::drawImplementation(osg::State& state) const if (doUpdate) { atc._transformedPosition = newTransformedPosition; - atc._projection = state.getProjectionMatrix(); + atc._projection = projection; atc._modelview = modelview; computePositions(contextID);