views:

93

answers:

1

this shows up with the color red:

VertexColorSet(&colors[vertexCounter], 1.0f, 0.0f, 0.0f, 1.0f);

this shows the color black:

VertexColorSet(&colors[vertexCounter], 0.9f, 0.0f, 0.0f, 1.0f);

why is it the color black shouldn't it just be a darker shade of red?

    glEnableClientState(GL_COLOR_ARRAY);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);

glVertexPointer(2, GL_FLOAT, 0, vertexes);
glColorPointer(4, GL_FLOAT, 0, colors);
glDrawElements(GL_TRIANGLES, 3*indexesPerButton*totalButtons, GL_UNSIGNED_SHORT, indexes);

//glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
    glDisableClientState(GL_COLOR_ARRAY);
A: 

and yes it is black because i used an int instead of a float

Mel
you should accept your own answer then
Bahbar
thank you I tried but you have to wait a couple days to accept the answer.
Mel