Purge some gcc and MSVC warnings

This commit is contained in:
Torsten Dreyer
2010-11-18 12:08:16 +01:00
parent ce67657e0a
commit 49f038b9d1
2 changed files with 3 additions and 2 deletions

View File

@@ -279,7 +279,7 @@ struct ColorMaskBuilder : PassAttributeBuilder
ColorMask *mask = new ColorMask;
Vec4 m = getColor(realProp);
mask->setMask(m.r(), m.g(), m.b(), m.a());
mask->setMask(m.r() > 0.0, m.g() > 0.0, m.b() > 0.0, m.a() > 0.0);
pass->setAttributeAndModes(mask);
}
};

View File

@@ -209,6 +209,7 @@ osg::Vec4::value_type computeComponent( int c, osg::Vec4 colors[2][2][2], bool c
case PRODUCT: return computeProduct( c, colors, colorValid );
case MIN: return computeMin( c, colors, colorValid );
case MAX: return computeMax( c, colors, colorValid );
default: break;
}
return 0;
}
@@ -230,7 +231,7 @@ osg::Vec4 computeColor( osg::Vec4 colors[2][2][2], bool colorValid[2][2][2], Mip
void dumpMipmap( std::string n, int s, int t, int r, int c, unsigned char *d, const osg::Image::MipmapDataType &o )
{
std::ofstream ofs( (n + ".dump").c_str() );
for ( int i = 0; i < o.size()+1; ++i )
for ( osg::Image::MipmapDataType::size_type i = 0; i < o.size()+1; ++i )
{
ofs << s << " " << t << " " << r << std::endl;
unsigned int offset = 0;