Changeset 2940 in orxonox.OLD for orxonox/trunk/importer
- Timestamp:
- Nov 21, 2004, 1:52:34 PM (20 years ago)
- Location:
- orxonox/trunk/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/importer/framework.cc
r2939 r2940 5 5 void DrawGLScene() 6 6 { 7 dist -= (dist-zoomTo)/100; 7 currFrame = SDL_GetTicks(); 8 dt = currFrame - lastFrame; 9 if (dt == 0) 10 dist += (zoomTo-dist)/500; 11 else 12 dist += (zoomTo-dist)/500 *(float)dt; 8 13 9 rotatorP += rotatorV ;14 rotatorP += rotatorV *(float)dt; 10 15 11 16 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); … … 20 25 21 26 SDL_GL_SwapBuffers(); // Swap the buffers 27 lastFrame = currFrame; 22 28 } 23 29 … … 96 102 { 97 103 printf("MouseWheel down\n"); 98 zoomTo *= 2 ;104 zoomTo *= 2.0; 99 105 } 100 106 else -
orxonox/trunk/importer/framework.h
r2938 r2940 11 11 float zoomTo; 12 12 13 Uint32 lastFrame; 14 Uint32 currFrame; 15 Uint32 dt; 16 13 17 WindowHandler wHandler; // Create an instance of the whandler basecode class 14 18 Object* obj;
Note: See TracChangeset
for help on using the changeset viewer.