Light & Wind Order

Hi All

My work is software render and I use OpenGL for preview only, so sorry if my question is naive.

With cull=off I've some black (unlit) polygons and I realize it happens because they have reversed wind order and/or vertices normals. However "rebuild model" is an inconvenient and time-consuming solution for user, moreover often he rotates models and expects for rational preview for both sides of surface.

With software render it's not a problem: first I adjust polygon normal to view direction, then I adjust vertices normals to polygon normal. But how to solve this in OpenGL? I've tried glMaterial and glColorMaterial with GL_FRONT_AND_BACK but it has no effect ;-(

So my question: is there a standard way to solve this prob or I should flip normal and wind myself anytime before pass them to OpenGL?


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!