jyoung77
03-17-2003, 04:43 PM
Hi,
I insert the following piece code into a big program. The triangle is always black on one face (it's ok to me that the other face is invisible). If I enable the lighting, the triangle is grey and won't change color no matter how I adjust the color setting below. Do you know why? I want to be able to change its color. Thanks.
Tony
glDisable (GL_LIGHTING);
glBegin(GL_POLYGON);
glColor3d(.0, .0, .0);
glVertex3f(.0, 0., 0.);
glColor3d(1., .5, .0);
glVertex3f(1., 1., 1.);
glColor3d(.0, 1., .3);
glVertex3f(-1., -1., 1.);
glEnd();
I insert the following piece code into a big program. The triangle is always black on one face (it's ok to me that the other face is invisible). If I enable the lighting, the triangle is grey and won't change color no matter how I adjust the color setting below. Do you know why? I want to be able to change its color. Thanks.
Tony
glDisable (GL_LIGHTING);
glBegin(GL_POLYGON);
glColor3d(.0, .0, .0);
glVertex3f(.0, 0., 0.);
glColor3d(1., .5, .0);
glVertex3f(1., 1., 1.);
glColor3d(.0, 1., .3);
glVertex3f(-1., -1., 1.);
glEnd();