Computer Graphics (iii) _ Elements of attributes _1_opengl state variables

Source: Internet
Author: User
OpenGL State variables
property values and other parameter settings are specified by independent functions that define the current OpenGL state. The state variables in OpenGL are color and other primitive attributes, current matrix patterns, elements of the Model watch matrix, cache current position and scene lighting effect parameters, and so on. All OpenGL parameters have default values that remain unchanged and work before the new value is specified. At any time we can query the current value of the state parameter of the system. The property settings for the output entities are discussed in the later sections of this chapter, with additional parameters being covered in the next few chapters.
All OpenGL primitives are displayed using the properties in the current state table. Changing one or several property settings can only affect those entities that are specified after the OpenGL state has changed. Therefore, we can display a green segment first, then change the current color to red, and then define another segment. This lets you display green and red line segments together. Similarly, some OpenGL state values can be specified in the Glbegin/g1end function with intermediate and coordinate values, so that the parameter settings can vary depending on the coordinate position.

Computer Graphics (iii) _ Elements of attributes _1_opengl state variables

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.