Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Martin <gary@garycmartin.com>2010-10-03 18:01:28 (GMT)
committer Gary Martin <gary@garycmartin.com>2010-10-03 18:01:28 (GMT)
commitd01737d10b0ed38182c805cc7db7f7b2c180f6f6 (patch)
tree86cf21f2b9e81dfe6e25ba6ffc53b13747d36074
parentb125364dfa6cca1511e2e2b31a6c50fb72d0076a (diff)
Small tidy-up trying to minimize time spent between screen clear and redraw.
-rw-r--r--physics.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/physics.py b/physics.py
index 704a62d..4156171 100644
--- a/physics.py
+++ b/physics.py
@@ -82,8 +82,8 @@ class PhysicsGame:
while self.running:
for event in pygame.event.get():
self.currentTool.handleEvents(event)
- # Clear Display
- self.screen.fill((255,255,255)) #255 for white
+
+ # Drive motors
if self.world.run_physics:
for body in self.world.world.GetBodyList():
if type(body.userData) == type({}):
@@ -93,6 +93,7 @@ class PhysicsGame:
# Update & Draw World
self.world.update()
+ self.screen.fill((255,255,255)) #255 for white
self.world.draw()
# draw output from tools