summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKamil Kaminski <nfm@phenon.localdomain>2010-10-03 04:02:24 -0500
committerKamil Kaminski <nfm@phenon.localdomain>2010-10-03 04:02:24 -0500
commit894049e3830679b9e04f711f7e8b106db6daeafd (patch)
tree9bec675f2eafa31607c64af35cdb9181bfe9fc37
parent2ac02c7158605c65d84983409e38fca175896762 (diff)
downloadGLPyramid-894049e3830679b9e04f711f7e8b106db6daeafd.tar.gz
GLPyramid-894049e3830679b9e04f711f7e8b106db6daeafd.tar.bz2
GLPyramid-894049e3830679b9e04f711f7e8b106db6daeafd.zip
pyramid: raise pyramid off the ground
-rw-r--r--sdl/pyramid.c14
1 files 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);