changeset 6:b06a7e9cda60

cleanup
author jsipek@huey.fsl.cs.sunysb.edu
date Thu, 24 Nov 2005 01:34:26 -0400
parents 02aee7371541
children e681fac7212c
files render.c
diffstat 1 files changed, 4 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/render.c	Thu Nov 24 01:20:30 2005 -0400
+++ b/render.c	Thu Nov 24 01:34:26 2005 -0400
@@ -32,7 +32,7 @@
 	int i;
 	int on_num;
 
-	for(i=0, on_num=0; i<3; buf++) {
+	for(i=0, on_num=0; i<6; buf++) {
 		if (!valid_digit_char(*buf) && on_num) {
 			on_num = 0;
 			i++;
@@ -45,21 +45,15 @@
 
 void draw_poly(char* buf)
 {
-	float f1, f2, f3;
+	float c1, c2, c3, f1, f2, f3;
 
 	buf += 5;
 
 	glBegin(GL_POLYGON);
 	while(1) {
-		if (sscanf(buf, "%f %f %f", &f1, &f2, &f3) != 3)
+		if (sscanf(buf, "%f %f %f %f %f %f", &c1, &c2, &c3, &f1, &f2, &f3) != 6)
 			break;
-		printf("using color: %f %f %f\n", f1, f2, f3);
-		glColor3f(f1, f2, f3);
-		buf = update_ptr(buf);
-
-		if (sscanf(buf, "%f %f %f", &f1, &f2, &f3) != 3)
-			break;
-		printf("using vertex: %f %f %f\n", f1, f2, f3);
+		glColor3f(c1, c2, c3);
 		glVertex3f(f1, f2, f3);
 		buf = update_ptr(buf);
 	}
@@ -113,19 +107,8 @@
 		}
 
 	ptr = buf;
-
-	/* clear window */
-
-	/* draw unit square polygon */
-	/*glBegin(GL_POLYGON);
-	glVertex2f(-0.5, -0.5);
-	glVertex2f(-0.5, 0.5);
-	glVertex2f(0.5, 0.5);
-	glVertex2f(0.5, -0.5);
-	glEnd();*/
 }
 
-
 void init()
 {
 	/* set clear color to black */