Web hosting faq - OpenGL Super Bible! Page 349 glFrontFace Purpose Defines

OpenGL Super Bible! Page 349 glFrontFace Purpose Defines which side of a polygon is the front or back. Include File Syntax void glFrontFace(GLenum mode); Description When a scene is made up of objects that are closed (you cannot see the inside), there is no need to do color or lighting calculations on the inside of the object. The glCullFace function will turn off such calculations for either the front or back of polygons. The glFrontFace function determines which side of the polygons is considered the front. If the vertices of a polygon are specified such that they travel around the polygon in a clockwise fashion, the polygon is said to have clockwise winding. If the vertices travel counterclockwise, the polygon is said to have counterclockwise winding. This function allows either the clockwise or counterclockwise wound face to be considered the front of the polygon. Parameters mode GLenum: Specifies the orientation of front facing polygons, clockwise (GL_CW) or counterclockwise (GL_CCW). Returns None. Example The following code from the AMBEINT example from this chapter shows how the color and drawing operations are disabled for the inside of the jet. It is also necessary to indicate which side of the polygon is the outside by specifying clockwise or counterclockwise winding. glEnable(GL_CULL_FACE); // Do not calculate inside of jet glFrontFace(GL_CCW); // Counterclockwise polygons face out See Also glCullFace, glLightModel
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Leave a Reply