OpenGL Homemade API 2

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.