PDA

View Full Version : two side lighting



yakovm
04-02-2010, 06:20 AM
Hi,
I have a mesh ,not all faces in the mesh are winded consistently.
I try to render it in such a way:


glDisable(GL_CULL_FACE);
glLightModelf(GL_LIGHT_MODEL_TWO_SIDE,GL_TRUE);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE,matCol);
//render ...(ununiformlly defined winding model)


As I have understood glLightModelf(GL_LIGHT_MODEL_TWO_SIDE,GL_TRUE) reverses backface normals ,but remains the front face normals...
But only back faces are lighted.What seems to be the problem?
Thank you in advance.

ZbuffeR
04-02-2010, 08:37 AM
Come one, please do not open a new thread for the same problem, just continue with the same thread :
http://www.opengl.org/discussion_boards/...5070#Post275070 (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Main=53065&Number=2750 70#Post275070)