My PR (#16) came about when testing an importer.
The interesting thing is that the imported mesh was flipped visually, but rendered correctly.
I stumbled on this line in the demo in particular:
glScalef(1, -1, 1);
Flipping that back to 1,1,1 the mesh was displayed inside out.
Telling GL the triangles are actually clockwise winding fixes this:
glFrontFace(GL_CW);
I suspect many people copying the example may find themselves head scratching if they aren't familiar with GL, or rendering concepts in general, since scaling -1 to solve winding is unconventional and renders the textures flipped on some axis.
Since I don't want to use CW winding I preferred the export CCW flag :)
My PR (#16) came about when testing an importer. The interesting thing is that the imported mesh was flipped visually, but rendered correctly.
I stumbled on this line in the demo in particular:
Flipping that back to
1,1,1
the mesh was displayed inside out. Telling GL the triangles are actually clockwise winding fixes this:I suspect many people copying the example may find themselves head scratching if they aren't familiar with GL, or rendering concepts in general, since scaling -1 to solve winding is unconventional and renders the textures flipped on some axis.
Since I don't want to use CW winding I preferred the export CCW flag :)