Browse Source

added deltaProfiler

Dave Schuyler 22 years ago
parent
commit
a4a994b599
1 changed files with 4 additions and 0 deletions
  1. 4 0
      direct/src/showbase/ShowBase.py

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

@@ -24,6 +24,8 @@ import FSM
 import State
 import State
 import DirectObject
 import DirectObject
 import SfxPlayer
 import SfxPlayer
+if __debug__:
+    import DeltaProfiler
 
 
 __builtins__["FADE_SORT_INDEX"] = 1000
 __builtins__["FADE_SORT_INDEX"] = 1000
 __builtins__["NO_FADE_SORT_INDEX"] = 2000
 __builtins__["NO_FADE_SORT_INDEX"] = 2000
@@ -189,6 +191,8 @@ class ShowBase(DirectObject.DirectObject):
         __builtins__["directNotify"] = directNotify
         __builtins__["directNotify"] = directNotify
         __builtins__["globalClock"] = ClockObject.getGlobalClock()
         __builtins__["globalClock"] = ClockObject.getGlobalClock()
         __builtins__["vfs"] = vfs
         __builtins__["vfs"] = vfs
+        if __debug__:
+            __builtins__["deltaProfiler"] = DeltaProfiler.DeltaProfiler("ShowBase")
 
 
         # Now hang a hook on the window-event from Panda.  This allows
         # Now hang a hook on the window-event from Panda.  This allows
         # us to detect when the user resizes, minimizes, or closes the
         # us to detect when the user resizes, minimizes, or closes the