Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 9, 2004, 2:23:06 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/importer: now the cube has a nice rotate on it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/importer/importer/framework.cc

    r2748 r2759  
    55WindowHandler wHandler;  // Create an instance of the whandler basecode class
    66Object* obj;
    7 
     7float rotator = 0.0;
    88
    99void DrawGLScene()
    1010{
    11 
     11  rotator +=.0001;
     12 
    1213  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
    1314  glLoadIdentity(); // Reset the view
    1415 
     16  glMatrixMode(GL_PROJECTION);                                          // Select The Projection Matrix
     17  glLoadIdentity();     
     18  gluPerspective(45.0f,500/375,0.1f,100.0f);
     19  gluLookAt (10*sin(rotator),5,10*cos(rotator), 0,0,0, 0,1,0);
     20
    1521  obj->draw();
     22
     23 
    1624
    1725  SDL_GL_SwapBuffers(); // Swap the buffers
Note: See TracChangeset for help on using the changeset viewer.