COIS712/ECOM708/C0IS800 Computer Graphics-Principles Systems Advanced Computer Graphics and Multimedia Advanced Computer Graphics& virtual Simulation Chapter 5 Attributes of Graphics Primitives
COIS712/ECOM708/COIS800 Computer Graphics – Principles & Systems Advanced Computer Graphics and Multimedia Advanced Computer Graphics & Virtual Simulation Chapter 5 Attributes of Graphics Primitives
Chapter 5 Attributes of Graphics Primitives Part I Color, point and line attributes Open gl functions
Chapter 5. Attributes of Graphics Primitives Part I. Color, point and line attributes OpenGL functions 2
Outline pen gL State Machine and variables Color and gray scale Open gl Color Functions Opengl point-Attribute Functions o Open gl Line-Attribute Functions
Outline OpenGL State Machine andVariables Color and Gray Scale OpenGL Color Functions OpenGL Point-AttributeFunctions OpenGL Line-Attribute Functions 3
OpenGL State Machine State system(or state machine) o a graphics system that maintains a list for the current values of attributes and other parameters(state variables or state parameters) We assign a value to one or more state parameters, that is, we put the system into a certain state o The state will be persistent until we change the value of a state arameter to change to change State 3 State 1 State 2 to change
OpenGL State Machine 4 State 1 …… State 2 to change State system (or state machine) A graphics system that maintains a list for the current values of attributes and other parameters (state variables or state parameters). We assign a value to one or more state parameters, that is, we put the system into a certain state. The state will be persistent until we change the value of a state parameter. to change to change State 3
OpenGL State Machine o Open gL is a finite state machine predetermined and countable number of different states e The graphics system behaviors are determined by these system state, which can be modified by calling openGL functions The Open gl state includes e The current color or other attributes MatrixMode(GL PROJECTION) o The current model viewing transformations g denty( ) gluortho2D(…) The current camera model clipping e The current lighting reflectance mo ● The current viewport All have default values, remaining until a new setting on it
OpenGL State Machine OpenGL is a finite state machine A predetermined and countable number of different states The graphics system behaviors are determined by these system state, which can be modified by calling OpenGL functions. The OpenGL state includes: The current color or other attributes The current model & viewing transformations The current camera model & clipping The current lighting & reflectance model The current viewport All have default values, remaining until a new setting on it. … glMatrixMode (GL_PROJECTION); glLoadIdentity( ); gluOrtho2D( … ); … 5