Professional Documents
Culture Documents
WHAT IS OPENGL?
A Pixel:
is the smallest visible element the display hardware
can put on the screen.
SOME IMPORTANT CONCEPTS
Information about the pixels (for instance, what color
they're supposed to be) is organized in memory into
bitplanes.
A bitplane:
is an area of memory that holds one bit of
information for every pixel on the screen; the bit might
indicate how red a particular pixel is supposed to be, for
example.
glColor3f:
Parameters
red, green, blue New red, green, and blue values for
the current color.
alpha A new alpha value for the current color.
Included only in the four-argument glColor4f function.
OPENGL COMMAND SYNTAX
glOrtho():
multiplies the current matrix by an orthographic
matrix.
Parameters
left, right
The coordinates for the left-and right-vertical
clipping planes.
bottom, top
The coordinates for the bottom- and top-horizontal
clipping planes.
zNear, zFar
The distances to the nearer and farther depth
clipping planes. These distances are negative if the plane is to
be behind the viewer.
OPENGL COMMAND SYNTAX
glBegin() and glEnd():
define the object to be drawn
glVertex3f:
specify a vertex
Parameters
x, y, z
The x, y and z coordinates of a vertex.
OPENGL COMMAND SYNTAX
glFlush():
forces execution of OpenGL functions in finite
time.
ensures that the drawing commands are actually
executed rather than stored in a buffer awaiting
additional OpenGL commands.
void glFlush( void );
Parameters