From 894049e3830679b9e04f711f7e8b106db6daeafd Mon Sep 17 00:00:00 2001 From: Kamil Kaminski Date: Sun, 3 Oct 2010 04:02:24 -0500 Subject: pyramid: raise pyramid off the ground --- sdl/pyramid.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sdl/pyramid.c b/sdl/pyramid.c index e2d317c..b25d073 100644 --- a/sdl/pyramid.c +++ b/sdl/pyramid.c @@ -25,7 +25,7 @@ static void resize(int w, int h) glLoadIdentity(); /* produce the perspective projection */ - gluPerspective(35.0f, fAspect, 1.0, 40.0); + gluPerspective(40.0f, fAspect, 1.0, 40.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); @@ -163,11 +163,11 @@ static void render(void) { M3DVector3f vNormal; M3DVector3f vCorners[5] = { - { 0.0f, .80f, 0.0f }, /* top 0 */ - { -0.5f, 0.0f, -.50f }, /* back left 1 */ - { 0.5f, 0.0f, -0.50f }, /* back right 2 */ - { 0.5f, 0.0f, 0.5f }, /* front right 3 */ - { -0.5f, 0.0f, 0.5f } /* front left 4 */ + { 0.0f, 0.6f, 0.0f }, /* top 0 */ + { -0.5f, -0.2f, -.50f }, /* back left 1 */ + { 0.5f, -0.2f, -0.50f }, /* back right 2 */ + { 0.5f, -0.2f, 0.5f }, /* front right 3 */ + { -0.5f, -0.2f, 0.5f } /* front left 4 */ }; /* clear the window with current clearing color */ @@ -176,7 +176,7 @@ static void render(void) /* save the matrix state and do the rotations */ glPushMatrix(); /* move object back and do in place rotation */ - glTranslatef(0.0f, -0.25f, -4.0f); + glTranslatef(0.0f, 0.4f, -4.0f); glRotatef(xRot, 1.0f, 0.0f, 0.0f); glRotatef(yRot, 0.0f, 1.0f, 0.0f); -- cgit v1.2.3