Archived

This topic is now archived and is closed to further replies.

nevermind figured it out!

This topic is 5144 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites