Changeset 9932 in orxonox.OLD for branches/test/sdl_opengl_test
- Timestamp:
- Nov 14, 2006, 4:13:15 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/test/sdl_opengl_test/sdl_opengl_test.cc
r9930 r9932 160 160 // das ist der code, der in eine WorldEntity::draw() funktion passen wuerde 161 161 162 glLoadIdentity(); 163 /* Move the object */ 164 glTranslatef(0.0f, 0.0f, -6.0f); 165 166 /* Rotate The Triangle On The Y axis */ 167 glRotatef(rtri, 0.0f, 1.0f, 0.0f); 168 169 /* Drawing the Triangles4 */ 170 glBegin(GL_TRIANGLES); /* Drawing Using Triangles */ 171 glColor3f( 2.0f, 0.0f, 0.0f); /* Red */ 172 glVertex3f( 0.0f, 2.0f, 0.0f); /* Top Of Triangle (Front) */ 173 glColor3f( 0.0f, 2.0f, 0.0f); /* Green */ 174 glVertex3f(-2.0f, -2.0f, 2.0f); /* Left Of Triangle (Front) */ 175 glColor3f( 0.0f, 0.0f, 2.0f); /* Blue */ 176 glVertex3f( 2.0f, -2.0f, 2.0f); /* Right Of Triangle (Front) */ 177 178 glColor3f( 2.0f, 0.0f, 0.0f); /* Red */ 179 glVertex3f( 0.0f, 2.0f, 0.0f); /* Top Of Triangle (Right) */ 180 glColor3f( 0.0f, 0.0f, 2.0f); /* Blue */ 181 glVertex3f( 2.0f, -2.0f, 2.0f); /* Left Of Triangle (Right) */ 182 glColor3f( 0.0f, 2.0f, 0.0f); /* Green */ 183 glVertex3f( 2.0f, -2.0f, -2.0f); /* Right Of Triangle (Right) */ 184 185 glColor3f( 2.0f, 0.0f, 0.0f); /* Red */ 186 glVertex3f( 0.0f, 2.0f, 0.0f); /* Top Of Triangle (Back) */ 187 glColor3f( 0.0f, 2.0f, 0.0f); /* Green */ 188 glVertex3f( 2.0f, -2.0f, -2.0f); /* Left Of Triangle (Back) */ 189 glColor3f( 0.0f, 0.0f, 2.0f); /* Blue */ 190 glVertex3f(-2.0f, -2.0f, -2.0f); /* Right Of Triangle (Back) */ 191 192 glColor3f( 2.0f, 0.0f, 0.0f); /* Red */ 193 glVertex3f( 0.0f, 2.0f, 0.0f); /* Top Of Triangle (Left) */ 194 glColor3f( 0.0f, 0.0f, 2.0f); /* Blue */ 195 glVertex3f(-2.0f, -2.0f, -2.0f); /* Left Of Triangle (Left) */ 196 glColor3f( 0.0f, 2.0f, 0.0f); /* Green */ 197 glVertex3f(-2.0f, -2.0f, 2.0f); /* Right Of Triangle (Left) */ 198 glEnd(); /* Finished Drawing The Triangles */ 162 199 163 /* ================================== WorldEntity zeichnen fertig ================================ */ 200 164
Note: See TracChangeset
for help on using the changeset viewer.