Академический Документы
Профессиональный Документы
Культура Документы
Vertex programs
application program
Per Vertex
Polynomial Operations &
Evaluator Primitive
Assembly
Texture
Memory
Pixel
Operations
10 MCA 401A - Computer Graphics, Dept of Computer Sc, M U
OpenGL Functions
Primitives
Points
Line Segments
Polygons
Attributes
Transformations
Viewing
Modeling
Control (GLUT)
Input (GLUT)
Query
GL_POINTS GL_POLYGON
GL_LINES GL_LINE_STRIP
GL_LINE_LOOP
GL_TRIANGLES
GL_QUAD_STRIP
GL_TRIANGLE_STRIP GL_TRIANGLE_FAN
nonconvex polygon
nonsimple polygon
14 MCA 401A - Computer Graphics, Dept of Computer Sc, M U
Text
Two forms of texts:
(i). Stroke text –Like any other geometric objects, vertices are used
to define line segments and curves that form the outline of each
character.
(ii). Raster text – Characters are defined as rectangles of bits called
bit blocks. Each block defines a single character by patterns of 0
and 1 bits in the block.
Attributes are part of the OpenGL state and determine the appearance of
objects
Color (points, lines, polygons)
Size and width (points, lines)
Stipple pattern (lines, polygons)
Polygon mode
Display as filled: solid color or stipple pattern
Display edges
Display vertices
glVertex3f(x,y,z)
glVertex3fv(p)
p is a pointer to an array
callbacks
Display function
Input and window functions
glutMainLoop();
} enter event loop
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
}
viewing volume
z=0
z=0
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);