Fixed camera positioning, fixed lighting, added arrow points, and more
authorAsh Tyndall <[email protected]>
Fri, 21 Oct 2011 03:20:14 +0000 (11:20 +0800)
committerAsh Tyndall <[email protected]>
Fri, 21 Oct 2011 03:20:14 +0000 (11:20 +0800)
* Camera code was completely redone so that it is in redraw only
* Starting camera position is much nicer now
* We're now using a perspective projection
* Teapot was having its front faces culled because it doesn't obey the right-hand rule; fix put in place for that.
* Mouse now moves and zooms camera in a way that is very similar to sample solution
* The WASD controls of camera can now be zoomed with a factor, which can be increased or decreased by using - or +
* Window resizing works as sample solution doeson one axis, but incorrectly zooms on another

scene.c

diff --git a/scene.c b/scene.c
index 1f206f6..395a725 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -348,7 +348,7 @@ void display() {
     glPushMatrix();\r
       glTranslatef(0.0, 0.5, 0.0); // **NOTE: Teapot currently does not rest on surface\r
       glColor3f(0.0, 0.0, 0.0);\r
-      glFrontFace(GL_CW);\r
+      glFrontFace(GL_CW); // The teapot does not obey the right-hand rule\r
       glutSolidTeapot(1);\r
       glFrontFace(GL_CCW);\r
     glPopMatrix();\r

UCC git Repository :: git.ucc.asn.au