Mercurial > hg > forks > bilotrip-mj12
comparison src/main.c @ 42:5770a4c85961
Shut up few warnings.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 05 Aug 2013 23:44:59 +0300 |
parents | 78c981f2ff2d |
children | f0073a47c31d |
comparison
equal
deleted
inserted
replaced
41:78c981f2ff2d | 42:5770a4c85961 |
---|---|
183 self->pen.x = self->pen.y = 0; | 183 self->pen.x = self->pen.y = 0; |
184 | 184 |
185 atlas = texture_atlas_new( 512, 512, 1 ); | 185 atlas = texture_atlas_new( 512, 512, 1 ); |
186 | 186 |
187 vec4 white = {{0.2,1,0.2,0.7}}; | 187 vec4 white = {{0.2,1,0.2,0.7}}; |
188 vec4 black = {{0,0,0,1}}; | 188 //vec4 black = {{0,0,0,1}}; |
189 vec4 none = {{0,0,1,0}}; | 189 //vec4 none = {{0,0,1,0}}; |
190 | 190 |
191 markup_t normal; | 191 markup_t normal; |
192 normal.family = "data/fonts/VeraMono.ttf"; | 192 normal.family = "data/fonts/VeraMono.ttf"; |
193 normal.size = 23.0; | 193 normal.size = 23.0; |
194 normal.bold = 0; | 194 normal.bold = 0; |
3261 GLint gFramesPerSecond = 0; | 3261 GLint gFramesPerSecond = 0; |
3262 | 3262 |
3263 void FPS(void) { | 3263 void FPS(void) { |
3264 static GLint Frames = 0; // frames averaged over 1000mS | 3264 static GLint Frames = 0; // frames averaged over 1000mS |
3265 static GLuint Clock; // [milliSeconds] | 3265 static GLuint Clock; // [milliSeconds] |
3266 static GLuint PreviousClock = 0; // [milliSeconds] | 3266 //static GLuint PreviousClock = 0; // [milliSeconds] |
3267 static GLuint NextClock = 0; // [milliSeconds] | 3267 static GLuint NextClock = 0; // [milliSeconds] |
3268 | 3268 |
3269 ++Frames; | 3269 ++Frames; |
3270 Clock = glutGet(GLUT_ELAPSED_TIME); //has limited resolution, so average over 1000mS | 3270 Clock = glutGet(GLUT_ELAPSED_TIME); //has limited resolution, so average over 1000mS |
3271 if ( Clock < NextClock ) return; | 3271 if ( Clock < NextClock ) return; |
3272 | 3272 |
3273 gFramesPerSecond = Frames/1; // store the averaged number of frames per second | 3273 gFramesPerSecond = Frames/1; // store the averaged number of frames per second |
3274 | 3274 |
3275 PreviousClock = Clock; | 3275 //PreviousClock = Clock; |
3276 NextClock = Clock+1000; // 1000mS=1S in the future | 3276 NextClock = Clock+1000; // 1000mS=1S in the future |
3277 Frames=0; | 3277 Frames=0; |
3278 } | 3278 } |
3279 | 3279 |
3280 void logic() | 3280 void logic() |