Polygon:
The counter-clockwise direction is positive and vice versa.
1, Glpolygonmode (Gl_front, Gl_fill); //Set the front for fill mode
2, Glpolygonmode (Gl_back, gl_line); //Set the reverse side to the Edge drawing mode
3, Glpolygonmode (Gl_front_and_back, gl_point); //Set both sides to be the vertex drawing mode
4. Glfrontface (GL_CCW);//Set CCW direction to "front", CCW is counterclockwise, counterclockwise
5. Glfrontface (GL_CW); Set the CW direction to "front", CW is clockwise, clockwise 6, glenable (Gl_cull_face), to start the culling function (using the gldisable (gl_cull_face) can be closed Then, use the Glcullface to reject.
The parameters of the glcullface can be gl_front,gl_back or gl_front_and_back, respectively, to reject the front, reject the opposite side, and reject both sides of the polygon.
6. Lines can be drawn as dashed lines, while polygons can be hollowed out.
First, use Glenable (gl_polygon_stipple) to start the cutout mode (use Gldisable (gl_polygon_stipple) to turn it off).
Then, use Glpolygonstipple to set the cutout style.
OpenGL Homemade API 2