Changeset 5383
- Timestamp:
- May 30, 2008, 12:59:50 PM (17 years ago)
- Location:
- anuga_work/development/anugavis/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/anugavis/src/events.c
r5380 r5383 98 98 if(ticks == 0) lastframe = ticks = SDL_GetTicks(); 99 99 else ticks = SDL_GetTicks(); 100 if(ticks - lastframe >= FRAME_INTERVAL){101 lastframe = ticks; 102 if(anugavis.current_frame < (signed int)anugavis.number_of_timesteps - 1){103 if(!anugavis.paused) anugavis.current_frame++;104 }else105 anugavis.paused = 1;106 }100 if(ticks - lastframe < TARGET_FRAME_RATE) return more; 101 102 lastframe = ticks; 103 if(anugavis.current_frame < (signed int)anugavis.number_of_timesteps - 1){ 104 if(!anugavis.paused) anugavis.current_frame++; 105 }else 106 anugavis.paused = 1; 107 107 108 108 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); -
anuga_work/development/anugavis/src/events.h
r5379 r5383 2 2 #define EVENTS_H 3 3 4 #define FRAME_INTERVAL 1004 #define TARGET_FRAME_RATE 60 5 5 6 6 typedef enum {KEY_FORWARD = 0,
Note: See TracChangeset
for help on using the changeset viewer.