PDA

View Full Version : draw a polygon twice for the lighting effect on both sides?



jyoung77
10-09-2003, 12:47 PM
Hi,

To make a polygon with the lighting effect on its both faces, Do we draw it two times, in each of which we set a proper normal? The two normals are opposite to each other.

Is there a better way? Please help. Thanks.

TOny

sqrt[-1]
10-09-2003, 04:40 PM
What you want is two sided lighting.
See glLightModel with GL_LIGHT_MODEL_TWO_SIDE.

Nvidia have some demos of this but I am unsure how fast this is on other cards. (you may be better off doing a double render)