per old glut manpages, glutTeapot calls generate clockwise frontfacing

polygons. Following recommendations in these manpages, updated the
shapes demo by surrounding calls with glFrontFace(GL_CW); and
glFrontFace(GL_CCW);


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1190 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2012-03-18 07:37:08 +00:00
parent 8ab33e935f
commit b171a73282

View File

@ -87,8 +87,6 @@ static void drawSolidIcosahedron(void) { glutSolidIcosahedron ();
static void drawWireIcosahedron(void) { glutWireIcosahedron (); } static void drawWireIcosahedron(void) { glutWireIcosahedron (); }
static void drawSolidSierpinskiSponge(void) { glutSolidSierpinskiSponge (depth, offset, orad);} /* orad doubles as size input */ static void drawSolidSierpinskiSponge(void) { glutSolidSierpinskiSponge (depth, offset, orad);} /* orad doubles as size input */
static void drawWireSierpinskiSponge(void) { glutWireSierpinskiSponge (depth, offset, orad); } /* orad doubles as size input */ static void drawWireSierpinskiSponge(void) { glutWireSierpinskiSponge (depth, offset, orad); } /* orad doubles as size input */
static void drawSolidTeapot(void) { glutSolidTeapot(orad); } /* orad doubles as size input */
static void drawWireTeapot(void) { glutWireTeapot(orad); } /* orad doubles as size input */
static void drawSolidTorus(void) { glutSolidTorus(irad,orad,slices,stacks); } static void drawSolidTorus(void) { glutSolidTorus(irad,orad,slices,stacks); }
static void drawWireTorus(void) { glutWireTorus (irad,orad,slices,stacks); } static void drawWireTorus(void) { glutWireTorus (irad,orad,slices,stacks); }
static void drawSolidSphere(void) { glutSolidSphere(orad,slices,stacks); } /* orad doubles as size input */ static void drawSolidSphere(void) { glutSolidSphere(orad,slices,stacks); } /* orad doubles as size input */
@ -97,6 +95,24 @@ static void drawSolidCone(void) { glutSolidCone(orad,orad,slices,
static void drawWireCone(void) { glutWireCone(orad,orad,slices,stacks); } /* orad doubles as size input */ static void drawWireCone(void) { glutWireCone(orad,orad,slices,stacks); } /* orad doubles as size input */
static void drawSolidCylinder(void) { glutSolidCylinder(orad,orad,slices,stacks); } /* orad doubles as size input */ static void drawSolidCylinder(void) { glutSolidCylinder(orad,orad,slices,stacks); } /* orad doubles as size input */
static void drawWireCylinder(void) { glutWireCylinder(orad,orad,slices,stacks); } /* orad doubles as size input */ static void drawWireCylinder(void) { glutWireCylinder(orad,orad,slices,stacks); } /* orad doubles as size input */
static void drawSolidTeapot(void)
{
/* per Glut manpage, it should be noted that the teapot is rendered
* with clockwise winding for front facing polygons...
*/
glFrontFace(GL_CW);
glutSolidTeapot(orad); /* orad doubles as size input */
glFrontFace(GL_CCW);
}
static void drawWireTeapot(void)
{
/* per Glut manpage, it should be noted that the teapot is rendered
* with clockwise winding for front facing polygons...
*/
glFrontFace(GL_CW);
glutWireTeapot(orad); /* orad doubles as size input */
glFrontFace(GL_CCW);
}
#define RADIUS 1.0f #define RADIUS 1.0f