diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 67: Draw the current scene only if it is still running.

Message ID 20110721123634.17019.71512.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

alexandros.frantzis@linaro.org July 21, 2011, 12:36 p.m. UTC
------------------------------------------------------------
revno: 67
committer: Alexandros Frantzis <alexandros.frantzis@linaro.org>
timestamp: Sun 2010-12-12 16:11:00 +0200
message:
  Draw the current scene only if it is still running.
modified:
  src/main.cpp


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'src/main.cpp'
--- src/main.cpp	2010-07-15 09:05:21 +0000
+++ src/main.cpp	2010-12-12 14:11:00 +0000
@@ -90,13 +90,16 @@ 
 
         screen.clear();
 
-        // Draw the next state of the current scene
+        // Update the state of the current scene
         scene[current_scene]->update();
-        scene[current_scene]->draw();
 
-        // If the scene has finished, move to the next one
-        if (!scene[current_scene]->is_running()) {
-            // Unload this scene
+        // If the current scene is still running then draw it,
+        // otherwise move to the next scene
+        if (scene[current_scene]->is_running()) {
+            scene[current_scene]->draw();
+        }
+        else {
+            // Unload the current scene
             scene[current_scene]->unload();
 
             current_scene++;