Browse Source

*** empty log message ***

Joe Shochet 25 years ago
parent
commit
bd33b97651
2 changed files with 0 additions and 15 deletions
  1. 0 3
      direct/src/showbase/ShowBase.py
  2. 0 12
      direct/src/task/Task.py

+ 0 - 3
direct/src/showbase/ShowBase.py

@@ -25,9 +25,6 @@ class ShowBase:
         self.wantDIRECT = self.config.GetBool('want-directtools', 0)
         self.wantStats = self.config.GetBool('want-stats', 0)
 
-        # Set a maximum frame rate on the render loop (0 means do not limit)
-        Task.maxFps = self.config.GetInt('max-fps', 120)
-        
         import Loader
 
         self.initialState = NodeAttributes()

+ 0 - 12
direct/src/task/Task.py

@@ -8,10 +8,6 @@ exit = -1
 done = 0
 cont = 1
 
-# Note: this is dconfig'ed in ShowBase.py, but Tasks want to be independent
-# of ShowBase and panda, so we have to set an initial value here
-maxFps = 120
-
 # Store the global clock
 globalClock = ClockObject.getGlobalClock()
 
@@ -269,15 +265,7 @@ class TaskManager:
             self.running = 1
             while self.running:
                 try:
-                    startTime = globalClock.getRealTime()
                     self.step()
-                    finishTime = globalClock.getRealTime()
-                    # Max out the frame rate so we do not starve the cpu
-                    if (maxFps > 0):
-                        dt = finishTime - startTime
-                        length = (1.0/maxFps)-dt
-                        if (length > 0):
-                            time.sleep(length)
                 except KeyboardInterrupt:
                     self.stop()
                 except: