[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glXUseXFont Subroutine

Purpose

Creates bitmap display lists from an X font.

Library

OpenGL C bindings library: libGL.a

C Syntax

void glXUseXFont(Font font
      int First
      int Count
      int ListBase)

Description

The glXUseXFont subroutine generates Count display lists, with each containing a single glBitmap command. These lists are named ListBase through ListBase+Count-1. The parameters of the glBitmap command of display list ListBase+i are derived from glyph first+i. Bitmap parameters Xorig, Yorig, Width, and Height are computed from font metrics as descent-1, -lbearing, rbearing-lbearing, and ascent+descent, respectively. Xmove is taken from the glyph's Width metric, and Ymove is set to 0 (zero). Finally, the glyph's image is converted to the appropriate format for the glBitmap command.

Using the glXUseXFont subroutine may be more efficient than accessing the X font and generating the display lists explicitly, since display lists are created on the server without requiring the glyph data to make a round-trip. Also, the server may choose to delay the creation of each bitmap until it is accessed.

Empty display lists are created for all glyphs that are requested but not defined in the Font parameter.

The glXUseXFont subroutine is ignored if there is no current GLX context.

Parameters

font Specifies the font from which character glyphs are taken.
First Specifies the index of the first glyph to be taken.
Count Specifies the number of glyphs to be taken.
ListBase Specifies the index of the first display list to be generated.

Error Codes

BadFont Is generated if font is not a valid font.
GLXBadContextState Is generated if the current GLX context is in display-list construction mode.
GLXBadCurrentWindow Is generated if the drawable associated with the current context of the calling thread is a window, and that window is no longer valid.

Files

/usr/include/GL/gl.h Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The glXMakeCurrent subroutine.

OpenGL in the AIXwindows (GLX) Environment.

OpenGL Overview.


[ Previous | Next | Contents | Glossary | Home | Search ]