]> git.mxchange.org Git - simgear.git/commitdiff
Check for the plib version when using display lists, just to be sure.
authorehofman <ehofman>
Sun, 10 Oct 2004 19:05:25 +0000 (19:05 +0000)
committerehofman <ehofman>
Sun, 10 Oct 2004 19:05:25 +0000 (19:05 +0000)
simgear/scene/model/model.cxx
simgear/scene/tgdb/obj.cxx

index f8740adc0e7767eeb6b378593b7249e491657e2e..ddfff6460657d08c7d8b16c4ae3e50c7287a7ebb 100644 (file)
@@ -332,9 +332,11 @@ sgLoad3DModel( const string &fg_root, const string &path,
                      sim_time_sec);
   }
 
+#if PLIB_VERSION > 183
   if ( model != 0 ) {
     makeDList( model );
   }
+#endif
 
   return alignmainmodel;
 }
index 901bd3e83edda179e21377243b0d35e3bdea6b91..c83d2198a93594c031b95497c3cae49b64d0fa9d 100644 (file)
@@ -177,6 +177,9 @@ bool sgGenTile( const string& path, SGBucket b,
         new ssgVtxTable ( GL_TRIANGLE_FAN, vl, nl, tl, cl );
 
     leaf->setState( state );
+#if PLIB_VERSION > 183
+    leaf->makeDList();
+#endif
 
     geometry->addKid( leaf );
 
@@ -448,7 +451,6 @@ bool sgBinObjLoad( const string& path, const bool is_base,
                                             nodes, normals, texcoords,
                                             tris_v[ind], tris_n[ind], tris_tc[ind],
                                             is_base, ground_lights );
-
                 if ( use_random_objects ) {
                     SGMaterial *mat = matlib->find( tri_materials[ind] );
                     if ( mat == NULL ) {
@@ -467,7 +469,6 @@ bool sgBinObjLoad( const string& path, const bool is_base,
                                             nodes, normals, texcoords,
                                             strips_v[ind], strips_n[ind], strips_tc[ind],
                                             is_base, ground_lights );
-
                 if ( use_random_objects ) {
                     SGMaterial *mat = matlib->find( strip_materials[ind] );
                     if ( mat == NULL ) {