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);
}
};
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;
}
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;