Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo scaling curiousity #17

Open
ruby0x1 opened this issue Sep 1, 2015 · 0 comments
Open

Demo scaling curiousity #17

ruby0x1 opened this issue Sep 1, 2015 · 0 comments

Comments

@ruby0x1
Copy link

ruby0x1 commented 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:

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 :)

@ruby0x1 ruby0x1 changed the title Demo curiousity Demo scaling curiousity Sep 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant