From: ehofman Date: Sun, 10 Oct 2004 19:05:25 +0000 (+0000) Subject: Check for the plib version when using display lists, just to be sure. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3a48c3de7a6014b731403ffe216d097177d6e7a9;p=simgear.git Check for the plib version when using display lists, just to be sure. --- diff --git a/simgear/scene/model/model.cxx b/simgear/scene/model/model.cxx index f8740adc..ddfff646 100644 --- a/simgear/scene/model/model.cxx +++ b/simgear/scene/model/model.cxx @@ -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; } diff --git a/simgear/scene/tgdb/obj.cxx b/simgear/scene/tgdb/obj.cxx index 901bd3e8..c83d2198 100644 --- a/simgear/scene/tgdb/obj.cxx +++ b/simgear/scene/tgdb/obj.cxx @@ -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 ) {