Tidy and more implementation:
authorAsh Tyndall <[email protected]>
Sun, 9 Oct 2011 11:26:10 +0000 (19:26 +0800)
committerAsh Tyndall <[email protected]>
Sun, 9 Oct 2011 11:26:10 +0000 (19:26 +0800)
* added Javadoc style information on all functions
* rearranged content to be in better places
* added dummy switch statements for menu event handlers
* commented out currently unimplemented menus
* implemented window reshaping function
* created dummy mouse event function
* added more gl initialisation stuff
* added dummy teapot drawing for testing purposes

scene.c

diff --git a/scene.c b/scene.c
index 30d982a..c7db7d9 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -468,15 +468,14 @@ void windowReshape(int w, int h) {
   GLdouble far = 10.0;\r
 \r
   glViewport(0, 0, (GLsizei) w, (GLsizei) h);\r
-   glMatrixMode(GL_PROJECTION);\r
-   glLoadIdentity();\r
-   if (w <= h) \r
-      glOrtho(near, far, near*(GLfloat)h/(GLfloat)w,\r
-               far*(GLfloat)h/(GLfloat)w, near, far);\r
-\r
-   else\r
-      glOrtho(near*(GLfloat)w/(GLfloat)h,\r
-               far*(GLfloat)w/(GLfloat)h, near, far, near, far);\r
+  glMatrixMode(GL_PROJECTION);\r
+  glLoadIdentity();\r
+  if (w <= h) \r
+    glOrtho(near, far, near*(GLfloat)h/(GLfloat)w,\r
+             far*(GLfloat)h/(GLfloat)w, near, far);\r
+  else\r
+    glOrtho(near*(GLfloat)w/(GLfloat)h,\r
+             far*(GLfloat)w/(GLfloat)h, near, far, near, far);\r
    glMatrixMode(GL_MODELVIEW); \r
    glLoadIdentity();\r
 }\r

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