Version:
1.0
Date:
Wednesday, March 28, 2001
Description:
Utility routines for handling text display with OpenGL
aglString provides the following utility routines:
GLuint BuildFontGL (AGLContext ctx, GLint fontID, Style face, GLint size)
// aglString initialization routine called for each unique font/style/size/context
void DeleteFontGL (GLuint fontList)
// must be called to correctly free the display list
void DrawPStringGL (Str255 pstrOut, GLuint fontList)
void DrawCStringGL (char * cstrOut, GLuint fontList)
// draws strings at the curretn raster position
// the strings are drawn with bitmaps thus bitmap operations will affect as they would normally
void MultiWinDrawFrameRate (GLuint fontList, long * frames, AbsoluteTime * time)
// Draw frame rate in current color at current raster positon with provided font display list
// This routine handles multiple windows, thus the calling code must track the values of frames and time from call to call
void DrawFrameRate (GLuint fontList)
// Draw frame rate in current color at current raster positon with provided font display list
// This routine uses the call to call delta time to determine frame rate, so this should only be called once per frame.
Note: You will have to change the access path for the OpenGL SDK with valid a one for your local environment. Additionally, you may have to add a path to the DrawSprocket SDK if you are using Universal Interfaces 3.2 or earlier.
Requirements: Project Builder or CWPro 6+, Carbon SDK 1.2.5+, Mac OS 8.6+, OpenGL SDK, Universal Interfaces 3.3+ or DrawSprocket SDK
Samples posted after the release of Mac OS X are designed to built with Project Builder and Mac OS X, or CodeWarrior 6 unless otherwise noted (Note, CodeWarrior 6 projects can be opened in CodeWarrior 5).
The newest Carbon SDK and Universal Interfaces can be found with Development Kits. Archives can be uncompressed with StuffIt Expander 5.0 or later.
|