From 19269dcb6ea96454202ec395b66e7f79f9f50d72 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 21 Mar 2002 02:02:06 +0000 Subject: [PATCH] update wait bar in pgraph too --- direct/src/gui/DirectWaitBar.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/direct/src/gui/DirectWaitBar.py b/direct/src/gui/DirectWaitBar.py index fd9d11b057..9ee11e7a01 100644 --- a/direct/src/gui/DirectWaitBar.py +++ b/direct/src/gui/DirectWaitBar.py @@ -1,4 +1,5 @@ from DirectFrame import * +import UsePgraph """ import DirectWaitBar @@ -77,8 +78,14 @@ class DirectWaitBar(DirectFrame): def update(self, value): self['value'] = value - # finally update the window - base.win.renderAndUpdate() + + # Render a frame out-of-sync with the igloop to update the + # window right now. This allows the wait bar to be updated + # even though we are not normally rendering frames. + if UsePgraph.use: + base.graphicsEngine.renderFrame() + else: + base.win.renderAndUpdate() def finish(self): # Fill the bar in N frames