glut polygon winding strangeness
Are there any known issues with the winding of the standard glutsolid functions?
For example, if I render
glutSolidSphere (1.0, 20, 20);
glPushMatrix();
glTranslatef(5,0,0);
glutSolidCone(2, 2, 10, 10);
glPopMatrix();
glPushMatrix();
glTranslatef(-2,0,0);
glutSolidTeapot(1);
glPopMatrix();
with
glFrontFace(GL_CCW);
glEnable(GL_CULL_FACE);
glCullFace(GL_FRONT);
then the teapot renders but not the sphere or cone.
likewise,
glFrontFace(GL_CCW);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
results in the sphere and cone, but not the teapot...
are they known to be inconsistent in the winding?
For example, if I render
glutSolidSphere (1.0, 20, 20);
glPushMatrix();
glTranslatef(5,0,0);
glutSolidCone(2, 2, 10, 10);
glPopMatrix();
glPushMatrix();
glTranslatef(-2,0,0);
glutSolidTeapot(1);
glPopMatrix();
with
glFrontFace(GL_CCW);
glEnable(GL_CULL_FACE);
glCullFace(GL_FRONT);
then the teapot renders but not the sphere or cone.
likewise,
glFrontFace(GL_CCW);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
results in the sphere and cone, but not the teapot...
are they known to be inconsistent in the winding?
Yes, the teapot is wound inside out with respect to the others. It's always been that way, and is documented in the glutSolidTeapot manpage.
Thanks arekkusu!
Is there anything related to OpenGL that you don't know? ;-)
Is there anything related to OpenGL that you don't know? ;-)
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Polygon budgets | Kerome | 1 | 2,409 |
Mar 7, 2010 04:55 AM Last Post: mikey |
|
| Getting the Normal for a polygon. | Jaden | 3 | 4,734 |
May 1, 2009 01:47 PM Last Post: Nosredna |
|
| Is there anything like polygon offset for GL_LINES? | TomorrowPlusX | 2 | 2,984 |
Jan 24, 2007 02:57 PM Last Post: TomorrowPlusX |
|
| 2d Polygon Intersection | bizimCity | 6 | 6,025 |
Aug 31, 2006 05:29 PM Last Post: reubert |
|
| Passing values to SDL_LoadBMP strangeness | Lunatic | 0 | 2,283 |
Sep 7, 2005 08:49 PM Last Post: Lunatic |
|

