View Full Version : front and back color
How to make different colors on front and back faces of a Cylinder or polygon?
05-28-2003, 02:00 PM
You can't specify the diffrent colors for two sides of polygon. One way to go around it is to draw the polygon two times. First with front and next with back cull facing.
I try but the back face (inside cylinder) is black.
glColor3f 1, 0#, 0#
obj = gluNewQuadric
gluCylinder obj, 5,5,2,64,18
glColor3f 0#, 1, 0#
05-30-2003, 01:12 PM
The code should look like that:
glColor (...); // first color
glColor (...); // second color
Thus, there is no black color and all works fine.
if you have lighting on you have a different story..
glMaterial have front and back properties.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.