I created a front/back shader and I use two pass one front and one back with the correct culling.
The problem is that i find some models(sketchup) that i suppose have both ccw meshes and cw meshes.
In this case I get wrong results.
Is possible to convert all faces in cw or in ccw?
How?
thanks.
ps.
I think that the trick is the sign of the normal, may be?
If the normal is positive then i’m in a cw(or ccw , i don’t know) else if the normal is negative in ccw.
Then in my importer i have a method that creates the triangles, i can test if the normal is negative ,then rebuilt the indexes else ok and i does nothing else that create the triangle wit the existing indexes.
But how i test if the normal go outside (positive?) or inside (negative?) with the opengl axis system.
sorry for my english
thanks