Next: GLUT Menu Functions:
Up: OpenGL Quick Reference Guide
Previous: OpenGL Basic Drawing:
GLUT Utilities for Complex Objects
GLUT provides a number of procedures for drawing complex objects.
- glRasterPos*(...):
-
Set the current raster position (in 3D window coordinates) for
subsequent glutBitmapCharacter() and other pixel copying
operations.
- glutBitmapCharacter(void *font, int character):
-
Draw the given character of the given font at the
current raster position and advance the current raster position.
Fonts include GLUT_BITMAP_9_BY_15,
GLUT_BITMAP_8_BY_13, GLUT_BITMAP_TIMES_ROMAN_10,
GLUT_BITMAP_TIMES_ROMAN_24. When a character is drawn,
the raster position is advanced. So to draw a string, initialize
the raster position (using glRasterPos*()) and then call
this on each character of the string.
- glutSolidSphere(GLdouble radius, GLint slices, GLint stacks):
-
Draw a solid sphere of the given radius, subdivided into
slices longitudinal strips, and stacks latitudinal
strips. Normal vectors are also defined for proper
illumination. Other shapes include glutSolidCone(),
glutSolidCube(), glutSolidTorus(),
glutSolidDodecahedron(), glutSolidTeapot(),
glutSolidOctahedron(), glutSolidTetrahedron(),
and glutSolidIcosahedron(). All of these also have
wire-frame versions that draw only the edges of the shape.
Please report any errors or send comments to
Dave Mount
Last updated: Sat, Feb 8, 2003.