Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
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?