From b48424236bbe810eeec0ba5afcffb483b0d7c919 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 6 Sep 2000 00:10:50 +0000 Subject: [PATCH] Tweaks relating to texture repeating effects for runways and disabling mipmaps (experimental). --- src/Objects/newmat.cxx | 6 +++++- src/Objects/newmat.hxx | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Objects/newmat.cxx b/src/Objects/newmat.cxx index 7d9ffc34d..d9e753986 100644 --- a/src/Objects/newmat.cxx +++ b/src/Objects/newmat.cxx @@ -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]; diff --git a/src/Objects/newmat.hxx b/src/Objects/newmat.hxx index c73fd502d..dc13a5507 100644 --- a/src/Objects/newmat.hxx +++ b/src/Objects/newmat.hxx @@ -76,6 +76,9 @@ private: // wrap texture? int wrapu, wrapv; + // use mipmapping? + int mipmap; + // material properties sgVec4 ambient, diffuse, specular, emission; -- 2.39.5