build_ssg_state(false);
}
-FGNewMat::FGNewMat (const string &texture_path)
+FGNewMat::FGNewMat (const string &texpath)
{
init();
+ texture_path = texpath;
build_ssg_state(true);
}
wrapu = props->getBoolValue("wrapu", true);
wrapv = props->getBoolValue("wrapv", true);
mipmap = props->getBoolValue("mipmap", true);
- light_coverage = props->getDoubleValue("light-coverage");
+ light_coverage = props->getDoubleValue("light-coverage", 0.0);
ambient[0] = props->getDoubleValue("ambient/r", 0.0);
ambient[1] = props->getDoubleValue("ambient/g", 0.0);
wrapu = true;
wrapv = true;
mipmap = true;
+ light_coverage = 0.0;
texture_loaded = false;
refcount = 0;
for (int i = 0; i < 4; i++)
textured->enable( GL_TEXTURE_2D );
textured->disable( GL_BLEND );
textured->disable( GL_ALPHA_TEST );
+#if 0
+# ifdef GL_EXT_texture_filter_anisotropic
+ float max_anisotropy;
+ glGetFloatv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &max_anisotropy );
+ glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT,
+ max_anisotropy );
+ cout << "Max anisotropy = " << max_anisotropy << endl;
+# endif
+#endif
if ( !defer_tex_load ) {
textured->setTexture( (char *)texture_path.c_str(), wrapu, wrapv );
texture_loaded = true;