Browse Source

first ticks for win32

Eduardo Bart 10 years ago
parent
commit
e281853a0c
2 changed files with 5 additions and 2 deletions
  1. 2
    2
      src/framework/engine.cpp
  2. 3
    0
      src/framework/win32platform.cpp

+ 2
- 2
src/framework/engine.cpp View File

@@ -76,12 +76,12 @@ void Engine::run()
76 76
         lastFrameTicks = ticks;
77 77
 
78 78
         // render only when visible
79
-        if(Platform::isWindowVisible()) {
79
+        //if(Platform::isWindowVisible()) {
80 80
             render();
81 81
 
82 82
             // swap buffers
83 83
             Platform::swapBuffers();
84
-        }
84
+        //}
85 85
     }
86 86
 
87 87
     lastFrameTicks = 0;

+ 3
- 0
src/framework/win32platform.cpp View File

@@ -62,6 +62,9 @@ void Platform::init(const char *appName)
62 62
 
63 63
     if(!RegisterClassA(&wc))
64 64
         fatal("Failed to register the window class.");
65
+
66
+    // force first tick
67
+    Platform::getTicks();
65 68
 }
66 69
 
67 70
 void Platform::terminate()

Loading…
Cancel
Save