nevermind figured it out!

Started by
-1 comments, last by pschmitt 20 years, 5 months ago
IGNORE THIS POST!! I FIGURED IT OUT; THANKS! (the library I'm using has it's own SetColor() function to handle changing glColord3d(...)) ///////////////////////////////////////////////////////////// Hi, I'm drawing a mesh of polygons, here's some syntax that I'm looping through:

          glEnable(GL_LIGHTING);
	  glBegin(GL_QUADS);
		glColor3d(0,0,1);
		glNormal3dv(vn[0].c);
		glVertex3dv(p[0].c);

		glNormal3dv(vn[1].c);
		glVertex3dv(p[1].c);

		glNormal3dv(vn[2].c);
		glVertex3dv(p[2].c);

		glNormal3dv(vn[3].c);
		glVertex3dv(p[3].c);
	glEnd();
	glDisable(GL_LIGHTING);
   
(note: each iteration of my loop gets a new vertex & vertex normal... vn[4] = array of normal vectors p[4] = array of vertices p[x].c => returns an array of doubles containing 3 elements vn[x].c => returns an array of doubles containing 3 elements BUT my object being drawn is ALWAYS white! How do I change the color of my object with lighting enabled? Thanks! Pete [edited by - pschmitt on November 11, 2003 1:56:03 AM] [edited by - pschmitt on November 11, 2003 1:56:27 AM]

This topic is closed to new replies.

Advertisement