Flark wrote:
> I'm using this to set my material's colors:
>
> glMaterialiv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE,
> color);
> However I am finding that my object is always white.
How does the "color" array look like? May be something is wrong
with it. Did you try "glMaterialfv"?
GLfloat color[] = {0.44f, 0.16f, 0.78f, 1.0f};
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color);
"Integer values are mapped linearly such that the most positive
representable value maps to 1.0, and the most negative representable
value maps to -1.0. Floating-point values are mapped directly. Neither
integer nor floating-point values are clamped."


|