mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
made onScreenDebug available in non-__debug__
This commit is contained in:
parent
2089dc7fce
commit
f86c6e322c
@ -31,7 +31,7 @@ import DirectObject
|
|||||||
import SfxPlayer
|
import SfxPlayer
|
||||||
if __debug__:
|
if __debug__:
|
||||||
from direct.directutil import DeltaProfiler
|
from direct.directutil import DeltaProfiler
|
||||||
import OnScreenDebug
|
import OnScreenDebug
|
||||||
|
|
||||||
__builtins__["FADE_SORT_INDEX"] = 1000
|
__builtins__["FADE_SORT_INDEX"] = 1000
|
||||||
__builtins__["NO_FADE_SORT_INDEX"] = 2000
|
__builtins__["NO_FADE_SORT_INDEX"] = 2000
|
||||||
@ -267,7 +267,7 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
__builtins__["__dev__"] = base.config.GetBool('want-dev', 0)
|
__builtins__["__dev__"] = base.config.GetBool('want-dev', 0)
|
||||||
if __debug__:
|
if __debug__:
|
||||||
__builtins__["deltaProfiler"] = DeltaProfiler.DeltaProfiler("ShowBase")
|
__builtins__["deltaProfiler"] = DeltaProfiler.DeltaProfiler("ShowBase")
|
||||||
__builtins__["onScreenDebug"] = OnScreenDebug.OnScreenDebug()
|
__builtins__["onScreenDebug"] = OnScreenDebug.OnScreenDebug()
|
||||||
|
|
||||||
ShowBase.notify.info('__dev__ == %s' % __dev__)
|
ShowBase.notify.info('__dev__ == %s' % __dev__)
|
||||||
|
|
||||||
@ -1183,10 +1183,9 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
return Task.cont
|
return Task.cont
|
||||||
|
|
||||||
def igLoop(self, state):
|
def igLoop(self, state):
|
||||||
if __debug__:
|
# We render the watch variables for the onScreenDebug as soon
|
||||||
# We render the watch variables for the onScreenDebug as soon
|
# as we reasonably can before the renderFrame().
|
||||||
# as we reasonably can before the renderFrame().
|
onScreenDebug.render()
|
||||||
onScreenDebug.render()
|
|
||||||
|
|
||||||
if self.recorder:
|
if self.recorder:
|
||||||
self.recorder.recordFrame()
|
self.recorder.recordFrame()
|
||||||
@ -1196,10 +1195,9 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
if self.clusterSyncFlag:
|
if self.clusterSyncFlag:
|
||||||
self.graphicsEngine.syncFrame()
|
self.graphicsEngine.syncFrame()
|
||||||
|
|
||||||
if __debug__:
|
# We clear the text buffer for the onScreenDebug as soon
|
||||||
# We clear the text buffer for the onScreenDebug as soon
|
# as we reasonably can after the renderFrame().
|
||||||
# as we reasonably can after the renderFrame().
|
onScreenDebug.clear()
|
||||||
onScreenDebug.clear()
|
|
||||||
|
|
||||||
if self.recorder:
|
if self.recorder:
|
||||||
self.recorder.playFrame()
|
self.recorder.playFrame()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user