Browse Source

restore oobeCull

David Rose 21 years ago
parent
commit
93dd513808
1 changed files with 5 additions and 16 deletions
  1. 5 16
      direct/src/showbase/ShowBase.py

+ 5 - 16
direct/src/showbase/ShowBase.py

@@ -1409,25 +1409,14 @@ class ShowBase(DirectObject.DirectObject):
                 gn.addGeom(geom)
                 gn.addGeom(geom)
                 self.oobeCullFrustumVis = self.oobeVis.attachNewNode(gn)
                 self.oobeCullFrustumVis = self.oobeVis.attachNewNode(gn)
 
 
-            # Assign each DisplayRegion shared by the camera to use
-            # this cull frustum.
-
-            # Support for this is currently absent from Panda.
-##             numDisplayRegions = self.camNode.getNumDisplayRegions()
-##             for d in range(0, numDisplayRegions):
-##                 dr = self.camNode.getDisplayRegion(d)
-##                 dr.setCullFrustum(pnode)
+            # Tell the camera to cull from here instead of its own
+            # origin.
+            self.camNode.setCullCenter(self.oobeCullFrustum)
+
         else:
         else:
             # Disable OOBE culling.
             # Disable OOBE culling.
 
 
-            # Assign each DisplayRegion shared by the camera to use
-            # the default cull frustum, the camera itself.
-
-##             numDisplayRegions = self.camNode.getNumDisplayRegions()
-##             for d in range(0, numDisplayRegions):
-##                 dr = self.camNode.getDisplayRegion(d)
-##                 dr.setCullFrustum(self.camNode)
-
+            self.camNode.setCullCenter(NodePath())
             self.oobeCullFrustum.removeNode()
             self.oobeCullFrustum.removeNode()
             self.oobeCullFrustum = None
             self.oobeCullFrustum = None