Changeset 5271 for anuga_work/development/anugavis/src/events.c
- Timestamp:
- May 2, 2008, 2:19:54 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/anugavis/src/events.c
r5261 r5271 8 8 # include <OpenGL/gl.h> 9 9 #endif 10 #ifdef HAVE_GL_GLU_H 11 # include <GL/glu.h> 12 #elif HAVE_OPENGL_GLU_H 13 # include <OpenGL/glu.h> 14 #endif 10 15 #include <SDL.h> 11 16 #include "events.h" 12 17 #include "globals.h" 18 #include "height_quantity.h" 13 19 14 20 int AnugaVis_Step(void){ 15 21 SDL_Event event; 16 22 int more = 1; 23 struct height_quantity_simple *height; 17 24 18 25 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 26 glMatrixMode(GL_MODELVIEW); 27 glLoadIdentity(); 28 gluLookAt(anugavis.eye[0], anugavis.eye[1], anugavis.eye[2], 29 anugavis.focus[0], anugavis.focus[1], anugavis.focus[2], 30 0, 0, 1); 31 for(height = anugavis.heights ; height != NULL ; height = height->next) 32 AnugaVis_DrawHeightQuantity(height); 19 33 SDL_GL_SwapBuffers(); 20 34 … … 22 36 switch(event.type){ 23 37 case SDL_KEYDOWN: 24 if(event.key.keysym.sym == SDLK_ESCAPE) more = 0; 38 switch(event.key.keysym.sym){ 39 case SDLK_ESCAPE: 40 more = 0; 41 break; 42 default: 43 break; 44 } 45 break; 46 case SDL_KEYUP: 47 switch(event.key.keysym.sym){ 48 default: 49 break; 50 } 25 51 break; 26 52 }
Note: See TracChangeset
for help on using the changeset viewer.