From Roger James, added GL_NORMALIZE mode to scaled models
This commit is contained in:
parent
e7d7c1dcc2
commit
dd628a9829
@ -58,6 +58,12 @@ Node* OrientationConverter::convert( Node *node )
|
|||||||
transform->setDataVariance(osg::Object::STATIC);
|
transform->setDataVariance(osg::Object::STATIC);
|
||||||
transform->setMatrix( C * R * S * T );
|
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);
|
root->addChild(transform);
|
||||||
transform->addChild(node);
|
transform->addChild(node);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user