textpsys
diff src/main.cc @ 3:b1c8d2784c72
made the timer internal to the effect, fx_draw doesn't take a time value any more
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 20 Aug 2015 06:40:23 +0300 |
parents | 4b1360a5d54d |
children |
line diff
1.1 --- a/src/main.cc Thu Aug 20 04:52:30 2015 +0300 1.2 +++ b/src/main.cc Thu Aug 20 06:40:23 2015 +0300 1.3 @@ -17,8 +17,6 @@ 1.4 static int win_width = 1280, win_height = 800; 1.5 static bool fullscreen; 1.6 1.7 -static unsigned long start_time; 1.8 - 1.9 int main(int argc, char **argv) 1.10 { 1.11 glutInit(&argc, argv); 1.12 @@ -43,18 +41,15 @@ 1.13 } 1.14 atexit(fx_cleanup); 1.15 1.16 - start_time = glutGet(GLUT_ELAPSED_TIME); 1.17 glutMainLoop(); 1.18 return 0; 1.19 } 1.20 1.21 void display() 1.22 { 1.23 - unsigned long msec = glutGet(GLUT_ELAPSED_TIME) - start_time; 1.24 - 1.25 glClear(GL_COLOR_BUFFER_BIT); 1.26 1.27 - fx_draw(msec); 1.28 + fx_draw(); 1.29 1.30 glutSwapBuffers(); 1.31 assert(glGetError() == GL_NO_ERROR);