OpenGL is an API (Application Programming Interface) used to render graphics on a computer screen.
Main Features are:
3D (and 2D)
Fast Hardware
language, OS, company independent.
OpenGL architecture review board.
Broad support
Low-level (right level!)
Standard graphics terminology.
OpenGL, GLU and GLUT
OpenGL: basic functions
GLU: OpenGL Utility library
GLUT: OpenGL Utility Toolkit library
GLU and GLUT: Handy functions for viewing and geometry
OpenGL and Java
C: glFunction(); gluFunction(); glutFunction();
Java: JOGL gl.glFunction(); glu.gluFunction(); glut.glutFunction();
No windowing functions offered by JOGL
OpenGL syntax
Functions: glFunction: glBegin, glClear, glVertex, …
Constants: GL_CONSTANT: GL_2D, GL_LINE
Datatypes: GLtype: GLbyte, GLint, GLfloat
OpenGL State
OpenGL is a state machine
OpenGL functions are of two types
Primitive generating
Can cause output if primitive is visible.
How vertices are processed and appearance of primitive are controlled by the state
State changing
Transformation functions
Attribute functions
Functions
Graphics Output Primitives
Line, polygon, sphere, …
Attributes
Color, line width, texture, …
Geometric transformations
Modeling, Viewing
Shading and illumination
Input functions
Your test is submitted successfully. Our team will verify you test and update in email for result.