Menu

#3 State leak

open
nobody
None
5
2011-05-25
2011-05-25
No

When using Hw Meshes, glColor is not set but ColorMode is set to osg::Material::AMBIENT_AND_DIFFUSE which results in random color
I fixed this bz turning off ColorMode.in HwMeshStateSetCache::createHwMeshStateSet

osg::Material * osgMat = (osg::Material *)stateSet->getAttribute(osg::StateAttribute::MATERIAL);
if(osgMat!=NULL)
osgMat->setColorMode( osg::Material::OFF );

Discussion


Log in to post a comment.