Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2759 in orxonox.OLD


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.

Location:
orxonox/branches/importer/importer
Files:
3 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
  • orxonox/branches/importer/importer/object.cc

    r2758 r2759  
    1212
    1313  glColor3f(1.0,0,0);
    14   glBegin(GL_TRIANGLES);
     14  glBegin(GL_QUADS);
    1515 
    1616  glArrayElement(0);
    1717  glArrayElement(1);
     18  glArrayElement(3);
     19  glArrayElement(2);
     20
    1821  glArrayElement(2);
    1922  glArrayElement(3);
     23  glArrayElement(5);
     24  glArrayElement(4);
     25
    2026  glArrayElement(4);
    2127  glArrayElement(5);
     28  glArrayElement(7);
     29  glArrayElement(6);
    2230
     31  glArrayElement(6);
     32  glArrayElement(7);
     33  glArrayElement(1);
     34  glArrayElement(0);
     35
     36  glArrayElement(1);
     37  glArrayElement(7);
     38  glArrayElement(5);
     39  glArrayElement(3);
     40
     41  glArrayElement(6);
     42  glArrayElement(0);
     43  glArrayElement(2);
     44  glArrayElement(4);
    2345 
    2446 
     
    6486            }
    6587        }
    66       vertices->addEntry(0,0,0);
    67       vertices->addEntry(0,-1,0);
    68       vertices->addEntry(-1,0,-1);
    6988      vertices->finalizeArray();
    70       for (int i=0;i<=20;i++)
    71         printf("%f\n",vertices->getArray()[i]);
    7289      fclose (OBJ_FILE);
    7390      return true;
  • orxonox/branches/importer/importer/windowHandler.cc

    r2748 r2759  
    1111
    1212        glViewport(0,0,width,height);                                           // Reset The Current Viewport
     13
    1314
    1415        glMatrixMode(GL_PROJECTION);                                            // Select The Projection Matrix
Note: See TracChangeset for help on using the changeset viewer.