"mi76" <mi333@[EMAIL PROTECTED]
> wrote in message
news:g8ff3c$gbh$1@[EMAIL PROTECTED]
> 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."
Yeah, I bet he's passing 1 rather than INT_MAX
-jbw


|