removing render flag

This commit is contained in:
Dave Schuyler 2003-12-13 00:28:52 +00:00
parent a53950c92d
commit a163f826e7
2 changed files with 19 additions and 33 deletions

View File

@ -270,8 +270,7 @@ class GravityWalker(DirectObject.DirectObject):
as floor, but are nearly vertical. This ray is
a hack to help deal with the cliff.
"""
if (base.isRendering
and self.collisionsActive
if (self.collisionsActive
and self.moving
and self.lifter.isInOuterSpace()):
temp = self.cRayNodePath.getZ()

View File

@ -66,12 +66,6 @@ class ShowBase(DirectObject.DirectObject):
# Fill this in with a function to invoke when the user "exits"
# the program by closing the main window.
self.exitFunc = None
# There are times when we are not drawing anything new to the
# screen, but we were grinding away on all the collision loops
# and shadow stuff and actually rendering. This is to test
# not doing some of that:
self.isRendering = 1
taskMgr.taskTimerVerbose = self.config.GetBool('task-timer-verbose', 0)
taskMgr.extendedExceptions = self.config.GetBool('extended-exceptions', 0)
@ -837,37 +831,34 @@ class ShowBase(DirectObject.DirectObject):
def shadowCollisionLoop(self, state):
# run the collision traversal if we have a
# CollisionTraverser set.
if self.isRendering:
if self.shadowTrav:
self.shadowTrav.traverse(self.render)
if self.shadowTrav:
self.shadowTrav.traverse(self.render)
return Task.cont
def collisionloop(self, state):
# run the collision traversal if we have a
# CollisionTraverser set.
if self.isRendering:
if self.cTrav:
self.cTrav.traverse(self.render)
if self.appTrav:
self.appTrav.traverse(self.render)
if self.cTrav:
self.cTrav.traverse(self.render)
if self.appTrav:
self.appTrav.traverse(self.render)
return Task.cont
def igloop(self, state):
if self.isRendering:
if __debug__:
# We render the watch variables for the onScreenDebug as soon
# as we reasonably can before the renderFrame().
onScreenDebug.render()
if __debug__:
# We render the watch variables for the onScreenDebug as soon
# as we reasonably can before the renderFrame().
onScreenDebug.render()
# Finally, render the frame.
self.graphicsEngine.renderFrame()
if self.clusterSyncFlag:
self.graphicsEngine.syncFrame()
# Finally, render the frame.
self.graphicsEngine.renderFrame()
if self.clusterSyncFlag:
self.graphicsEngine.syncFrame()
if __debug__:
# We clear the text buffer for the onScreenDebug as soon
# as we reasonably can after the renderFrame().
onScreenDebug.clear()
if __debug__:
# We clear the text buffer for the onScreenDebug as soon
# as we reasonably can after the renderFrame().
onScreenDebug.clear()
if self.mainWinMinimized:
# If the main window is minimized, slow down the app a bit
@ -885,10 +876,6 @@ class ShowBase(DirectObject.DirectObject):
throwNewFrame()
return Task.cont
def setRendering(self, isRendering):
self.isRendering = isRendering
print "** base.isRendering=%s **"%isRendering
def restart(self):
self.shutdown()
# resetPrevTransform goes at the very beginning of the frame.