You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :)
The text was updated successfully, but these errors were encountered:
ruby0x1
changed the title
Demo curiousity
Demo scaling curiousity
Sep 1, 2015
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:
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 :)
The text was updated successfully, but these errors were encountered: