View Full Version : Color both sides of a quad
Is it possible to color both sides of a quad with different colors? If it is, how can we do it?
11-11-2002, 11:34 AM
What do you mean with both sides of a quad?
11-11-2002, 11:46 AM
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).]
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.