View Full Version : color
every thing in my scene appears to have be the same color as the floor - I'm not using texture mapping - how can I sort this out?
11-17-2001, 02:08 PM
Try to have a look at
it changes the color for all vertices drawn after this call
so for example to draw a nice rainbow triangle
glColor3f(1.0f, 0.0f, 0.0f)
glColor3f(0.0f, 1.0f, 0.0f)
glColor3f(0.0f, 0.0f, 1.0f)
11-17-2001, 02:10 PM
I forgot to say that for that rainbow triangle, you should have smooth shading enabled(flat shading uses the color of the first or third vertex - sorry, not sure about that - for the whole triangle)
[This message has been edited by Platinum (edited 12-06-2001).]
I actually use glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, SurfaceColour);
11-18-2001, 01:01 PM
If you are using material properties, such as you specified, then make sure that you have properly enabled lighting.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.