]> git.mxchange.org Git - flightgear.git/commitdiff
Tweaks.
authorcurt <curt>
Mon, 8 Jan 2001 22:01:24 +0000 (22:01 +0000)
committercurt <curt>
Mon, 8 Jan 2001 22:01:24 +0000 (22:01 +0000)
src/Main/main.cxx
src/Main/viewer_lookat.cxx
src/Main/viewer_rph.cxx

index 96d8fe16e59ad4ffe32e83365cb2dd00bf05f489..0b831e7302c487a1399b4b6ff8104551703425e8 100644 (file)
@@ -1550,16 +1550,8 @@ int main( int argc, char **argv ) {
     }
 
     FGPath modelpath( globals->get_options()->get_fg_root() );
-    // modelpath.append( "Models" );
-    // modelpath.append( "Geometry" );
-  
-    FGPath texturepath( globals->get_options()->get_fg_root() );
-    texturepath.append( "Models" );
-    texturepath.append( "Textures" );
-  
     ssgModelPath( (char *)modelpath.c_str() );
-    ssgTexturePath( (char *)texturepath.c_str() );
-
+  
     // Scene graph root
     scene = new ssgRoot;
     scene->setName( "Scene" );
@@ -1624,6 +1616,15 @@ int main( int argc, char **argv ) {
     string acmodel_path =
        globals->get_props()->getStringValue("/sim/model/path",
                                        "Models/Geometry/glider.ac");
+
+    string full_model = globals->get_options()->get_fg_root() + "/"
+       + acmodel_path;
+    int pos = full_model.rfind("/");
+    
+    FGPath texturepath( full_model.substr(0, pos) );
+    cout << "Texture path = " << texturepath.str() << endl;
+    ssgTexturePath( (char *)texturepath.c_str() );
+
     ssgEntity *acmodel_obj = ssgLoad((char *)(acmodel_path.c_str()));
 
     // find moving parts (if this is an MDL model)
index acbc0ed3f70388b93028a48a55347601890e3710..fed2b3025cc84d1832c287dd4d0ce3944192ea0b 100644 (file)
@@ -177,8 +177,8 @@ void FGViewerLookAt::update() {
     // THIS IS THE EXPERIMENTAL VIEWING ANGLE SHIFTER
     // THE MAJORITY OF THE WORK IS DONE IN GUI.CXX
     // this in gui.cxx for now just testing
-    extern float quat_mat[4][4];
-    sgPreMultMat4( VIEW, quat_mat);
+    extern float GuiQuat_mat[4][4];
+    sgPreMultMat4( VIEW, GuiQuat_mat);
     // !!!!!!!!!! testing      
 
     // Given a vector pointing straight down (-Z), map into onto the
index ca632928e07b5c479f0eca12e79e01c98c7dae4c..a1be07d0438d95eb5ecdfc4c1a63eb0c9fab71c6 100644 (file)
@@ -303,8 +303,8 @@ void FGViewerRPH::update() {
     // THIS IS THE EXPERIMENTAL VIEWING ANGLE SHIFTER
     // THE MAJORITY OF THE WORK IS DONE IN GUI.CXX
     // this in gui.cxx for now just testing
-    extern float quat_mat[4][4];
-    sgPreMultMat4( VIEW, quat_mat);
+    extern float GuiQuat_mat[4][4];
+    sgPreMultMat4( VIEW, GuiQuat_mat);
     // !!!!!!!!!! testing      
 
     // Given a vector pointing straight down (-Z), map into onto the