diff options
Diffstat (limited to 'sdl/gldraw.c')
-rw-r--r-- | sdl/gldraw.c | 68 |
1 files changed, 31 insertions, 37 deletions
diff --git a/sdl/gldraw.c b/sdl/gldraw.c index b4e3be7..ef01fac 100644 --- a/sdl/gldraw.c +++ b/sdl/gldraw.c @@ -69,49 +69,43 @@ void glDrawSnowman(void) /* this screws up the rendering, possibly becasue it's glut? */ void glDrawFigures(void) { - glDisable(GL_TEXTURE_2D); - glDisable(GL_LIGHTING); - glPushMatrix(); - /* scale the figures */ - glScalef(0.02f, 0.02f, 0.02f); + /* scale the figures */ + glScalef(0.02f, 0.02f, 0.02f); - /* draw red cube */ - glColor3f(1.0f, 0.0f, 0.0f); - glPushMatrix(); - glutSolidCube(48.0f); - glPopMatrix(); + /* draw red cube */ + glColor3f(1.0f, 0.0f, 0.0f); + glPushMatrix(); + glutSolidCube(48.0f); + glPopMatrix(); - /* draw green sphere */ - glColor3f(0.0f, 1.0f, 0.0f); - glPushMatrix(); - glTranslatef(-60.0f, 0.0f, 0.0f); - glutSolidSphere(25.0f, 50, 50); - glPopMatrix(); + /* draw green sphere */ + glColor3f(0.0f, 1.0f, 0.0f); + glPushMatrix(); + glTranslatef(-60.0f, 0.0f, 0.0f); + glutSolidSphere(25.0f, 50, 50); + glPopMatrix(); - /* draw magenta torus */ - glColor3f(1.0f, 0.0f, 1.0f); - glPushMatrix(); - glTranslatef(0.0f, 0.0f, 60.0f); - glutSolidTorus(8.0f, 16.0f, 50, 50); - glPopMatrix(); + /* draw magenta torus */ + glColor3f(1.0f, 0.0f, 1.0f); + glPushMatrix(); + glTranslatef(0.0f, 0.0f, 60.0f); + glutSolidTorus(8.0f, 16.0f, 50, 50); + glPopMatrix(); - /* draw yellow cone */ - glColor3f(1.0f, 1.0f, 0.0f); - glPushMatrix(); - glRotatef(-90.0f, 1.0f, 0.0f, 0.0f); - glTranslatef(60.0f, 0.0f, -24.0f); - glutSolidCone(25.0f, 50.0f, 50, 50); - glPopMatrix(); + /* draw yellow cone */ + glColor3f(1.0f, 1.0f, 0.0f); + glPushMatrix(); + glRotatef(-90.0f, 1.0f, 0.0f, 0.0f); + glTranslatef(60.0f, 0.0f, -24.0f); + glutSolidCone(25.0f, 50.0f, 50, 50); + glPopMatrix(); - /* draw cyan teapot */ - glColor3f(0.0f, 1.0f, 1.0f); - glPushMatrix(); - glTranslatef(0.0f, 0.0f, -60.0f); - glutSolidTeapot(25.0f); - glPopMatrix(); + /* draw cyan teapot */ + glColor3f(0.0f, 1.0f, 1.0f); + glPushMatrix(); + glTranslatef(0.0f, 0.0f, -60.0f); + glutSolidTeapot(25.0f); glPopMatrix(); - glEnable(GL_LIGHTING); - glEnable(GL_TEXTURE_2D); } void glDrawTriangle(void) |