Guys,
Is it possible to color both sides of a quad with different colors? If it is, how can we do it?
Thanks,
Suf.
Guys,
Is it possible to color both sides of a quad with different colors? If it is, how can we do it?
Thanks,
Suf.
What do you mean with both sides of a quad?
If you’re using lighting, you can set the material for both sides of a quad to be different. The first paramter of glMaterial takes a parameter of GL_FRONT, GL_BACK or GL_FRONT_AND_BACK. If I remember right, though, this typically results in poor performance.
Other ways of doing it include:
Creating 2 faces with the same verticies, with different winding orders, and different colors. Enable back face culling when doing this.
Enable back face culling, specify the winding order as CCW, draw with your first color, Set the winding order as CW and draw with your second color.
[This message has been edited by Deiussum (edited 11-11-2002).]