Changeset 2759 in orxonox.OLD for orxonox/branches
- Timestamp:
- Nov 9, 2004, 2:23:06 AM (20 years ago)
- Location:
- orxonox/branches/importer/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/importer/importer/framework.cc
r2748 r2759 5 5 WindowHandler wHandler; // Create an instance of the whandler basecode class 6 6 Object* obj; 7 7 float rotator = 0.0; 8 8 9 9 void DrawGLScene() 10 10 { 11 11 rotator +=.0001; 12 12 13 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); 13 14 glLoadIdentity(); // Reset the view 14 15 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 15 21 obj->draw(); 22 23 16 24 17 25 SDL_GL_SwapBuffers(); // Swap the buffers -
orxonox/branches/importer/importer/object.cc
r2758 r2759 12 12 13 13 glColor3f(1.0,0,0); 14 glBegin(GL_ TRIANGLES);14 glBegin(GL_QUADS); 15 15 16 16 glArrayElement(0); 17 17 glArrayElement(1); 18 glArrayElement(3); 19 glArrayElement(2); 20 18 21 glArrayElement(2); 19 22 glArrayElement(3); 23 glArrayElement(5); 24 glArrayElement(4); 25 20 26 glArrayElement(4); 21 27 glArrayElement(5); 28 glArrayElement(7); 29 glArrayElement(6); 22 30 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); 23 45 24 46 … … 64 86 } 65 87 } 66 vertices->addEntry(0,0,0);67 vertices->addEntry(0,-1,0);68 vertices->addEntry(-1,0,-1);69 88 vertices->finalizeArray(); 70 for (int i=0;i<=20;i++)71 printf("%f\n",vertices->getArray()[i]);72 89 fclose (OBJ_FILE); 73 90 return true; -
orxonox/branches/importer/importer/windowHandler.cc
r2748 r2759 11 11 12 12 glViewport(0,0,width,height); // Reset The Current Viewport 13 13 14 14 15 glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
Note: See TracChangeset
for help on using the changeset viewer.