Browse Source

Bypass view frustum cull entirely when camera has OmniBV

rdb 11 years ago
parent
commit
7d0c1420c2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      panda/src/display/graphicsEngine.cxx

+ 3 - 1
panda/src/display/graphicsEngine.cxx

@@ -41,6 +41,7 @@
 #include "bamCache.h"
 #include "bamCache.h"
 #include "cullableObject.h"
 #include "cullableObject.h"
 #include "geomVertexArrayData.h"
 #include "geomVertexArrayData.h"
+#include "omniBoundingVolume.h"
 #include "vertexDataSaveFile.h"
 #include "vertexDataSaveFile.h"
 #include "vertexDataBook.h"
 #include "vertexDataBook.h"
 #include "vertexDataPage.h"
 #include "vertexDataPage.h"
@@ -1212,7 +1213,8 @@ do_cull(CullHandler *cull_handler, SceneSetup *scene_setup,
     PT(BoundingVolume) bv = scene_setup->get_cull_bounds();
     PT(BoundingVolume) bv = scene_setup->get_cull_bounds();
 
 
     if (bv != (BoundingVolume *)NULL &&
     if (bv != (BoundingVolume *)NULL &&
-        bv->is_of_type(GeometricBoundingVolume::get_class_type())) {
+        bv->is_of_type(GeometricBoundingVolume::get_class_type()) &&
+        !bv->is_of_type(OmniBoundingVolume::get_class_type())) {
       // Transform it into the appropriate coordinate space.
       // Transform it into the appropriate coordinate space.
       PT(GeometricBoundingVolume) local_frustum;
       PT(GeometricBoundingVolume) local_frustum;
       local_frustum = DCAST(GeometricBoundingVolume, bv->make_copy());
       local_frustum = DCAST(GeometricBoundingVolume, bv->make_copy());