Imagination PowerVR SDK Blog

glColor and glColorArray


#1

Hi!

I’ll start with example:
assume that:
ColorBufferId is valid,
and color buffer is valid
vertex buffer is binded somewhere and is also valid.

glColor(1.0f, 1.0f, 1.0f, 1.0f);
// draw something

glEnableClientState(GL_COLOR_ARRAY);
glBindBuffer(GL_ARRAY_BUFFER, ColorBufferId);
glColorPointer(4, GL_FIXED, 0, NULL);
glDrawElements(GL_TRIANGLES, 100, GL_UNSIGNED_SHORT, NULL);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glDisableClientState(GL_COLOR_ARRAY);



This code behaves differently on NVIDIA, intel and ATI cards.
I’ve found that on NVIDIA and intel code after glColor changes global
color to color in the color buffer but not on ATI so I’m wondering if
it is ATI driver issue or maybe I’m doing something wrong?