From dd628a9829d563b9a04350618576638bf7606347 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 3 Jul 2007 10:00:41 +0000 Subject: [PATCH] From Roger James, added GL_NORMALIZE mode to scaled models --- applications/osgconv/OrientationConverter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/applications/osgconv/OrientationConverter.cpp b/applications/osgconv/OrientationConverter.cpp index 79254d74a..9bdc5d160 100644 --- a/applications/osgconv/OrientationConverter.cpp +++ b/applications/osgconv/OrientationConverter.cpp @@ -58,6 +58,12 @@ Node* OrientationConverter::convert( Node *node ) transform->setDataVariance(osg::Object::STATIC); transform->setMatrix( C * R * S * T ); + if (!S.isIdentity()) + { + // Add a normalize state. This will be removed if the FlattenStaticTransformsVisitor works + transform->getOrCreateStateSet()->setMode(GL_NORMALIZE, osg::StateAttribute::ON); + } + root->addChild(transform); transform->addChild(node);