seed r782 - trunk/examples/opengl



Author: racarr
Date: Tue Jan 20 20:15:46 2009
New Revision: 782
URL: http://svn.gnome.org/viewvc/seed?rev=782&view=rev

Log:
Yay, all the gears render correctly now

Modified:
   trunk/examples/opengl/seed-gears.js

Modified: trunk/examples/opengl/seed-gears.js
==============================================================================
--- trunk/examples/opengl/seed-gears.js	(original)
+++ trunk/examples/opengl/seed-gears.js	Tue Jan 20 20:15:46 2009
@@ -30,14 +30,15 @@
 	da = 2.0 * Math.PI / teeth / 4.0;
 	for (var i = 0; i < teeth; i++) {
 		var angle = (i) * 2.0 * Math.PI / teeth;
-	
+
 		GL.Vertex3f(r2 * Math.cos(angle + 2 * da), 
 					r2 * Math.sin(angle + 2 * da), width * 0.5);
 		GL.Vertex3f(r1 * Math.cos(angle + 3 * da), 
 					r1 * Math.sin(angle + 3 * da), width * 0.5);
-		GL.Vertex3f(r1 * Math.cos(angle), r1 * Math.sin(angle), width * 0.5);
+
 		GL.Vertex3f(r2 * Math.cos(angle + da), 
 					r2 * Math.sin(angle + da), width * 0.5);
+		GL.Vertex3f(r1 * Math.cos(angle), r1 * Math.sin(angle), width * 0.5);
 	}
     GL.End();
 
@@ -228,5 +229,4 @@
 GLUT.IdleFunc(idle);
 GLUT.ReshapeFunc(reshape);
 
-
 GLUT.MainLoop();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]