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);
glDrawE开发者_JS百科lements(GL_TRIANGLES, 3*indexesPerButton*totalButtons, GL_UNSIGNED_SHORT, indexes);
//glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glDisableClientState(GL_COLOR_ARRAY);
and yes it is black because i used an int instead of a float
精彩评论