usata-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Usata-commits] Changes to usata2/src/usata.cpp


From: David Lau
Subject: [Usata-commits] Changes to usata2/src/usata.cpp
Date: Mon, 03 Jan 2005 03:06:16 -0500

Index: usata2/src/usata.cpp
diff -u usata2/src/usata.cpp:1.14 usata2/src/usata.cpp:1.15
--- usata2/src/usata.cpp:1.14   Sun Jan  2 06:47:04 2005
+++ usata2/src/usata.cpp        Mon Jan  3 07:43:49 2005
@@ -10,7 +10,7 @@
 // included in the software distribution, or visit
 // http://www.fsf.org/licenses/gpl.html.
 //
-// $Id: usata.cpp,v 1.14 2005/01/02 06:47:04 skunix Exp $
+// $Id: usata.cpp,v 1.15 2005/01/03 07:43:49 skunix Exp $
 
 #include "usata.hpp"
 #include "config.hpp"
@@ -149,15 +149,25 @@
        quit = false;
 
        unsigned int cnt=0;     
-
+       bool updated=false;
        while (!quit)
        {
+               
                while (clock.try_next())
+               {
                        ++cnt;
-               
+                       updated=true;
+                       scene->update();
+               }
                if (cnt > 60)
                        quit=true;
 
+               if (updated)
+               {
+                       scene->draw();
+                       updated= false;
+               }
+
        }
 
        return 0;
@@ -174,7 +184,7 @@
        boost::filesystem::path datapath = find_data();
        // FIXME: catch exceptions
        texture_manager->load_path(datapath);
-
+       GuiNode::create(scene.get());
        //texture_manager->get("atex");
 
        return loop();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]