From 3a48c3de7a6014b731403ffe216d097177d6e7a9 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sun, 10 Oct 2004 19:05:25 +0000 Subject: [PATCH] Check for the plib version when using display lists, just to be sure. --- simgear/scene/model/model.cxx | 2 ++ simgear/scene/tgdb/obj.cxx | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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 ) { -- 2.39.5