]> git.mxchange.org Git - flightgear.git/blobdiff - src/Objects/material.cxx
cygwin32 fixes by norman vine.
[flightgear.git] / src / Objects / material.cxx
index 0a300253aac15c0fa9791f4de7d1d07709b467c0..737e8471b9e3f4e361c29260d52bea9a19060b05 100644 (file)
@@ -25,7 +25,7 @@
 #  include <config.h>
 #endif
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #ifdef FG_MATH_EXCEPTION_CLASH
 #  include <math.h>
 #endif
 
 #include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl/xgl.h>
 
 #include STL_STRING
 
-#include <Debug/logstream.hxx>
-#include <Misc/fgpath.hxx>
-#include <Misc/fgstream.hxx>
+#include <simgear/debug/logstream.hxx>
+#include <simgear/misc/fgpath.hxx>
+#include <simgear/misc/fgstream.hxx>
 
 #include "material.hxx"
 #include "texload.h"
@@ -60,7 +60,7 @@ FGMaterial::FGMaterial ( void )
     ambient[0]  = ambient[1]  = ambient[2]  = ambient[3]  = 0.0;
     diffuse[0]  = diffuse[1]  = diffuse[2]  = diffuse[3]  = 0.0;
     specular[0] = specular[1] = specular[2] = specular[3] = 0.0;
-    emissive[0] = emissive[1] = emissive[2] = emissive[3] = 0.0;
+    emission[0] = emission[1] = emission[2] = emission[3] = 0.0;
 }
 
 
@@ -86,9 +86,9 @@ operator >> ( istream& in, FGMaterial& m )
        } else if ( token == "specular" ) {
            in >> token >> m.specular[0] >> m.specular[1]
               >> m.specular[2] >> m.specular[3];
-       } else if ( token == "emissive" ) {
-           in >> token >> m.emissive[0] >> m.emissive[1]
-              >> m.emissive[2] >> m.emissive[3];
+       } else if ( token == "emission" ) {
+           in >> token >> m.emission[0] >> m.emission[1]
+              >> m.emission[2] >> m.emission[3];
        } else if ( token == "alpha" ) {
            in >> token >> token;
            if ( token == "yes" ) {
@@ -106,6 +106,7 @@ operator >> ( istream& in, FGMaterial& m )
     return in;
 }
 
+
 void
 FGMaterial::load_texture( const string& root )
 {
@@ -245,6 +246,25 @@ FGMaterial::load_texture( const string& root )
 }
 
 
+// Destructor
+void FGMaterial::dump_info () {
+    FG_LOG( FG_TERRAIN, FG_INFO, "{" << endl << "  texture = " 
+           << texture_name );
+    FG_LOG( FG_TERRAIN, FG_INFO, "  xsize = " << xsize );
+    FG_LOG( FG_TERRAIN, FG_INFO, "  ysize = " << ysize );
+    FG_LOG( FG_TERRAIN, FG_INFO, "  ambient = " << ambient[0] << " "
+           << ambient[1] <<" "<< ambient[2] <<" "<< ambient[3] );
+    FG_LOG( FG_TERRAIN, FG_INFO, "  diffuse = " << diffuse[0] << " " 
+           << diffuse[1] << " " << diffuse[2] << " " << diffuse[3] );
+    FG_LOG( FG_TERRAIN, FG_INFO, "  specular = " << specular[0] << " " 
+           << specular[1] << " " << specular[2] << " " << specular[3]);
+    FG_LOG( FG_TERRAIN, FG_INFO, "  emission = " << emission[0] << " " 
+           << emission[1] << " " << emission[2] << " " << emission[3]);
+    FG_LOG( FG_TERRAIN, FG_INFO, "  alpha = " << alpha << endl <<"}" );
+           
+}
+
+
 // Destructor
 FGMaterial::~FGMaterial ( void ) {
 }