Modified Files:

simgear/scene/model/SGMaterialAnimation.cxx:
	Olaf Flebbe: Use brakets around bitwise operations.
	Greetings from LinuxTag, Berlin ... :)
This commit is contained in:
frohlich 2007-05-30 13:07:05 +00:00
parent e700fc6f34
commit a8ba041b67

View File

@ -471,13 +471,13 @@ SGMaterialAnimation::createAnimationGroup(osg::Group& parent)
mat->setColorMode(osg::Material::OFF); mat->setColorMode(osg::Material::OFF);
} else if ((suppliedColors & defaultColorModeMask) != 0) { } else if ((suppliedColors & defaultColorModeMask) != 0) {
// First deal with the complicated AMBIENT/DIFFUSE case. // First deal with the complicated AMBIENT/DIFFUSE case.
if (defaultColorModeMask & AMBIENT_DIFFUSE != 0) { if ((defaultColorModeMask & AMBIENT_DIFFUSE) != 0) {
// glColor can supply colors not specified by the animation. // glColor can supply colors not specified by the animation.
unsigned matColorModeMask = ((~suppliedColors & defaultColorModeMask) unsigned matColorModeMask = ((~suppliedColors & defaultColorModeMask)
& AMBIENT_DIFFUSE); & AMBIENT_DIFFUSE);
if (matColorModeMask & DIFFUSE != 0) if ((matColorModeMask & DIFFUSE) != 0)
mat->setColorMode(osg::Material::DIFFUSE); mat->setColorMode(osg::Material::DIFFUSE);
else if (matColorModeMask & AMBIENT != 0) else if ((matColorModeMask & AMBIENT) != 0)
mat->setColorMode(osg::Material::AMBIENT); mat->setColorMode(osg::Material::AMBIENT);
else else
mat->setColorMode(osg::Material::OFF); mat->setColorMode(osg::Material::OFF);