]> git.mxchange.org Git - flightgear.git/commitdiff
Tweaks relating to texture repeating effects for runways and disabling mipmaps
authorcurt <curt>
Wed, 6 Sep 2000 00:10:50 +0000 (00:10 +0000)
committercurt <curt>
Wed, 6 Sep 2000 00:10:50 +0000 (00:10 +0000)
(experimental).

src/Objects/newmat.cxx
src/Objects/newmat.hxx

index 7d9ffc34dbbe98e0c9e2fb28b96940f2ca884249..d9e7539869745651c779ddae6db573db24dadc38 100644 (file)
@@ -41,6 +41,7 @@
 // Constructor
 FGNewMat::FGNewMat ( void ) {
     wrapu = wrapv = 1;
+    mipmap = 1;
 }
 
 
@@ -58,6 +59,7 @@ FGNewMat::FGNewMat ( const string &mat_name, const string &tex_name )
     texture_name = tex_name;
     xsize = ysize = 0;
     wrapu = wrapv = 1;
+    mipmap = 1;
     alpha = 0; 
     ambient[0]  = ambient[1]  = ambient[2]  = ambient[3]  = 1.0;
     diffuse[0]  = diffuse[1]  = diffuse[2]  = diffuse[3]  = 1.0;
@@ -83,7 +85,7 @@ void FGNewMat::build_ssg_state( const string& path,
     textured->disable( GL_BLEND );
     textured->disable( GL_ALPHA_TEST );
     textured->setTexture( (char *)tex_file.c_str(), wrapu, wrapv );
-    cout << "wrap u = " << wrapu << " wrapv = " << wrapv << endl;
+    // cout << "wrap u = " << wrapu << " wrapv = " << wrapv << endl;
     textured->enable( GL_COLOR_MATERIAL );
     textured->setColourMaterial( GL_AMBIENT_AND_DIFFUSE );
     textured->setMaterial( GL_EMISSION, 0, 0, 0, 1 );
@@ -202,6 +204,8 @@ operator >> ( istream& in, FGNewMat& m )
            in >> token >> m.wrapu;
        } else if ( token == "wrapv" ) {
            in >> token >> m.wrapv;
+       } else if ( token == "mipmap" ) {
+           in >> token >> m.mipmap;
        } else if ( token == "ambient" ) {
            in >> token >> m.ambient[0] >> m.ambient[1]
               >> m.ambient[2] >> m.ambient[3];
index c73fd502dc9f415828d70aeb7a095a9794d4c22d..dc13a5507752673fad1703a205ae9430fc7245e0 100644 (file)
@@ -76,6 +76,9 @@ private:
     // wrap texture?
     int wrapu, wrapv;
 
+    // use mipmapping?
+    int mipmap;
+
     // material properties
     sgVec4 ambient, diffuse, specular, emission;