Tutorials
Documentation
Context State Commands

Functions

void glcCallbackFunc (GLCenum inOpcode, GLCfunc inFunc)
void glcDataPointer (GLvoid *inPointer)
void glcDeleteGLObjects (void)
void glcDisable (GLCenum inAttrib)
void glcEnable (GLCenum inAttrib)
GLCfunc glcGetCallbackFunc (GLCenum inOpcode)
const GLCchar * glcGetListc (GLCenum inAttrib, GLint inIndex)
GLint glcGetListi (GLCenum inAttrib, GLint inIndex)
GLvoid * glcGetPointer (GLCenum inAttrib)
const GLCchar * glcGetc (GLCenum inAttrib)
GLfloat glcGetf (GLCenum inAttrib)
GLfloat * glcGetfv (GLCenum inAttrib, GLfloat *outVec)
GLint glcGeti (GLCenum inAttrib)
GLboolean glcIsEnabled (GLCenum inAttrib)
void glcStringType (GLCenum inStringType)
void glcPushAttribQSO (GLbitfield inMask)
void glcPopAttribQSO (void)

Detailed Description

Commands to get or modify informations of the context state of the current thread.

GLC refers to the current context state whenever it executes a command. Most of its state is directly available to the user : in order to control the result of the GLC commands, the user may want to get or modify the state of the current context. This is precisely the purpose of the context state commands.

Note
Some GLC commands create, use or delete display lists and/or textures. The IDs of those display lists and textures are stored in the current GLC context but the display lists and the textures themselves are managed by the current GL context. In order not to impact the performance of error-free programs, QuesoGLC does not check if the current GL context is the same as the context where the display lists and the textures are actually stored. If the current GL context has changed meanwhile, the result of commands that refer to the corresponding display lists or textures is undefined.

Function Documentation

◆ glcCallbackFunc()

void glcCallbackFunc ( GLCenum inOpcode,
GLCfunc inFunc )

This command assigns the value inFunc to the callback function variable identified by inOpCode which must be chosen in the following table.

Callback function variables
NameEnumerantInitial valueType signature
GLC_OP_glcUnmappedCode0x0020GLC_NONEGLboolean (*)(GLint)

The callback function can access to client data in a thread-safe manner with glcGetPointer().

Parameters
inOpcodeType of the callback function
inFuncCallback function
See also
glcGetCallbackFunc()
glcGetPointer()
glcDataPointer()
glcRenderChar()

◆ glcDataPointer()

void glcDataPointer ( GLvoid * inPointer)

This command assigns the value inPointer to the variable GLC_DATA_POINTER.

It is used for an access to client data from the callback function assigned to the variable GLC_OP_glcUnmappedCode

glcDataPointer provides a way to store, in the GLC context, a pointer to any data. A GLC callback function can subsequently use the command glcGetPointer() to obtain access to those data in a thread-safe manner.

Parameters
inPointerThe pointer to assign to GLC_DATA_POINTER
See also
glcGetPointer()
glcCallbackFunc()

◆ glcDeleteGLObjects()

void glcDeleteGLObjects ( void )

This command causes GLC to issue a sequence of GL commands to delete all of the GL objects it owns.

GLC uses the command glDeleteLists to delete all of the GL objects named in GLC_LIST_OBJECT_LIST and uses the command glDeleteTextures to delete all of the GL objects named in GLC_TEXTURE_OBJECT_LIST. When an execution of glcDeleteGLObjects finishes, both of these lists are empty.

Note
glcDeleteGLObjects deletes only the objects that the current GLC context owns, not all objects in all contexts.
Generally speaking, it is always a good idea to call glcDeleteGLObjects before calling glcDeleteContext(). It is also a good idea to call glcDeleteGLObjects before changing the GL context that is associated with the current GLC context.
See also
glcGetListi()

◆ glcDisable()

void glcDisable ( GLCenum inAttrib)

This command assigns the value GL_FALSE to the boolean variable identified by inAttrib.

Boolean variables
NameEnumerantInitial value
GLC_AUTO_FONT0x0010GL_TRUE
GLC_GL_OBJECTS0x0011GL_TRUE
GLC_MIPMAP0x0012GL_TRUE
GLC_HINTING_QSO0x8005GL_FALSE
GLC_EXTRUDE_QSO0x8006GL_FALSE
GLC_KERNING_QSO0x8007GL_FALSE
Parameters
inAttribA symbolic constant indicating a GLC capability.
See also
glcIsEnabled()
glcEnable()

◆ glcEnable()

void glcEnable ( GLCenum inAttrib)

This command assigns the value GL_TRUE to the boolean variable identified by inAttrib which must be chosen in the table above.

  • GLC_AUTO_FONT : if enabled, GLC tries to automatically find a font among the masters to map the character code to be rendered (see also glcRenderChar()).
  • GLC_GL_OBJECTS : if enabled, GLC stores characters rendering commands in GL display lists and textures (if any) in GL texture objects.
  • GLC_MIPMAP : if enabled, texture objects used by GLC are mipmapped
  • GLC_HINTING_QSO : if enabled, GLC uses the hinting procedures that are available for most scalable fonts. It gives better results for characters that are rendered at small sizes. This attribute is ignored when GLC_GL_OBJECTS is enabled. Hinting may generate visual artifacts such as "shaking outlines" if the character is animated. This attribute should be disabled in such cases.
  • GLC_EXTRUDE_QSO : if enabled and GLC_RENDER_STYLE is GLC_TRIANGLE then GLC renders extruded characters with a thickness equal to 1.0. A call to glScale3*(1., 1., thickness ) can be added before the rendering commands in order to obtain the desired thickness.
  • GLC_KERNING_QSO : if enabled, GLC uses kerning information when rendering or measuring a string. Not all fonts have kerning informations.
Parameters
inAttribA symbolic constant indicating a GLC attribute.
See also
glcDisable()
glcIsEnabled()

◆ glcGetCallbackFunc()

GLCfunc glcGetCallbackFunc ( GLCenum inOpcode)

This command returns the value of the callback function variable identified by inOpcode.

Currently, inOpcode can only have the value GLC_OP_glcUnmappedCode. Its initial value and the type signature are defined in the table shown in glcCallbackFunc()'s definition.

Parameters
inOpcodeThe callback function to be retrieved
Returns
The value of the callback function variable
See also
glcCallbackFunc()

◆ glcGetListc()

const GLCchar * glcGetListc ( GLCenum inAttrib,
GLint inIndex )

This command returns the string at offset inIndex from the first element in the string list identified by inAttrib which must be chosen in the table below :

String lists
NameEnumerantInitial valueElement count variable
GLC_CATALOG_LIST0x0080<empty list>GLC_CATALOG_COUNT

The command raises a GLC_PARAMETER_ERROR if inIndex is less than zero or is greater than or equal to the value of the list's element count variable.

Parameters
inAttribThe string list attribute
inIndexThe index from which to retrieve an element.
Returns
The string list element
See also
glcGetListi()

◆ glcGetListi()

GLint glcGetListi ( GLCenum inAttrib,
GLint inIndex )

This command returns the integer at offset inIndex from the first element in the integer list identified by inAttrib.

You can choose from the following integer lists, listed below with their element count variables :

Integer lists
NameEnumerantInitial valueElement count variable
GLC_CURRENT_FONT_LIST0x0090<empty list>GLC_CURRENT_FONT_COUNT
GLC_FONT_LIST0x0091<empty list>GLC_FONT_COUNT
GLC_LIST_OBJECT_LIST0x0092<empty list>GLC_LIST_OBJECT_COUNT
GLC_TEXTURE_OBJECT_LIST0x0093<empty list>GLC_TEXTURE_OBJECT_COUNT
GLC_BUFFER_OBJECT_LIST_QSO0x800F<empty list>GLC_BUFFER_OBJECT_COUNT_QSO

The command raises a GLC_PARAMETER_ERROR if inIndex is less than zero or is greater than or equal to the value of the list's element count variable.

Parameters
inAttribThe integer list attribute
inIndexThe index from which to retrieve the element.
Returns
The element from the integer list.
See also
glcGetListc()

◆ glcGetPointer()

GLvoid * glcGetPointer ( GLCenum inAttrib)

This command returns the value of the pointer variable identified by inAttrib.

Pointer variables
NameEnumerantInitial value
GLC_DATA_POINTER0x00A0GLC_NONE
Parameters
inAttribThe pointer category
Returns
The pointer
See also
glcDataPointer()

◆ glcGetc()

const GLCchar * glcGetc ( GLCenum inAttrib)

This command returns the value of the string constant identified by inAttrib.

String constants must be chosen in the table below :

String constants
NameEnumerant
GLC_EXTENSIONS0x00B0
GLC_RELEASE0x00B1
GLC_VENDOR0x00B2
Parameters
inAttribThe attribute that identifies the string constant
Returns
The string constant.
See also
glcGetf()
glcGeti()
glcGetfv()
glcGetPointer()

◆ glcGetf()

GLfloat glcGetf ( GLCenum inAttrib)

This command returns the value of the floating point variable identified by inAttrib.

Float point variables
NameEnumerantInitial value
GLC_RESOLUTION0x00C00.0
Parameters
inAttribThe parameter value to be returned.
Returns
The current value of the floating point variable.
See also
glcGetc()
glcGeti()
glcGetfv()
glcGetPointer()

◆ glcGetfv()

GLfloat * glcGetfv ( GLCenum inAttrib,
GLfloat * outVec )

This command stores into outVec the value of the floating point vector identified by inAttrib.

If the command does not raise an error, it returns outVec, otherwise it returns a NULL value.

Floating point vector variables
NameEnumerantInitial value
GLC_BITMAP_MATRIX0x00D0[ 1. 0. 0. 1.]

The command raises GLC_PARAMETER_ERROR if outVec is NULL.

Parameters
inAttribThe parameter value to be returned
outVecSpecifies where to store the return value
Returns
The current value of the floating point vector variable
See also
glcGetf()
glcGeti()
glcGetc()
glcGetPointer()

◆ glcGeti()

GLint glcGeti ( GLCenum inAttrib)

This command returns the value of the integer variable or constant identified by inAttrib.

Integer variables and constants
NameEnumerantInitial value
GLC_CATALOG_COUNT0x00E0<implementation specific>
GLC_CURRENT_FONT_COUNT0x00E10
GLC_FONT_COUNT0x00E20
GLC_LIST_OBJECT_COUNT0x00E30
GLC_MASTER_COUNT0x00E4<implementation specific>
GLC_MEASURED_CHAR_COUNT0x00E50
GLC_RENDER_STYLE0x00E6GLC_BITMAP
GLC_REPLACEMENT_CODE0x00E70
GLC_STRING_TYPE0x00E8GLC_UCS1
GLC_TEXTURE_OBJECT_COUNT0x00E90
GLC_VERSION_MAJOR0x00EA<implementation specific>
GLC_VERSION_MINOR0x00EB<implementation specific>
GLC_MATRIX_STACK_DEPTH_QSO0x80080
GLC_MAX_MATRIX_STACK_DEPTH_QSO0x8009<implementation specific>
GLC_ATTRIB_STACK_DEPTH_QSO0x800C0
GLC_MAX_ATTRIB_STACK_DEPTH_QSO0x800D<implementation specific>
GLC_BUFFER_OBJECT_COUNT_QSO0x800E0
Parameters
inAttribAttribute for which an integer variable is requested.
Returns
The value or values of the integer variable.
See also
glcGetc()
glcGetf()
glcGetfv()
glcGetPointer()

◆ glcIsEnabled()

GLboolean glcIsEnabled ( GLCenum inAttrib)

This command returns GL_TRUE if the value of the boolean variable identified by inAttrib is GL_TRUE (quoted from the specs ^_^)

Attributes that can be enabled or disabled are listed on the glcDisable() description.

Parameters
inAttribThe attribute to be tested
Returns
The state of the attribute inAttrib.
See also
glcEnable()
glcDisable()

◆ glcStringType()

void glcStringType ( GLCenum inStringType)

This command assigns the value inStringType to the variable GLC_STRING_TYPE.

The string types are listed in the table below :

String types
NameEnumerantType of characters
GLC_UCS10x0110GLubyte
GLC_UCS20x0111GLushort
GLC_UCS40x0112GLuint
GLC_UTF8_QSO0x8004<character dependent>

Every character string used in the GLC API is represented as a zero-terminated array, unless otherwise specified. The value of the variable GLC_STRING_TYPE determines the interpretation of the array. The values GLC_UCS1, GLC_UCS2, GLC_UCS4 and GLC_UTF8_QSO indicate how each element of the string should be interpreted. Currently QuesoGLC supports UCS1, UCS2, UCS4 and UTF-8 formats as defined in the Unicode 4.0.1 and ISO/IEC 10646:2003 standards. The initial value of GLC_STRING_TYPE is GLC_UCS1.

Note
Currently, the string formats UCS2 and UCS4 are interpreted according to the underlying platform endianess. If the strings are provided in a different endianess than the platform's, the client must translate the strings in the correct endianess.

The value of a character code in a returned string may exceed the range of the character encoding selected by GLC_STRING_TYPE. In this case, the returned character is converted to a character sequence \<hexcode>, where \ is the character REVERSE SOLIDUS (U+5C), < is the character LESS-THAN SIGN (U+3C), > is the character GREATER-THAN SIGN (U+3E), and hexcode is the original character code represented as a sequence of hexadecimal digits. The sequence has no leading zeros, and alphabetic digits are in upper case.

Parameters
inStringTypeValue to assign to GLC_STRING_TYPE
See also
glcGeti() with argument GLC_STRING_TYPE

◆ glcPushAttribQSO()

void glcPushAttribQSO ( GLbitfield inMask)

This command provides a means to save groups of state variables.

It takes a OR of symbolic constants indicating which groups of state variables to push onto the attribute stack. Each constant refers to a group of state variables.

Group attributes
Group attributeNameEnumerant
enableGLC_ENABLE_BIT_QSO0x0001
renderGLC_RENDER_BIT_QSO0x0002
stringGLC_STRING_BIT_QSO0x0004
GLC_GL_ATTRIB_BIT_QSO0x0008
GLC_ALL_ATTRIBS_BIT_QSO0xFFFF

The classification of each variable into a group is indicated in the following table of state variables.

State variables
NameTypeGet commandGroup attribute
GLC_AUTO_FONTGLbooleanglcIsEnabled()enable
GLC_GL_OBJECTSGLbooleanglcIsEnabled()enable
GLC_MIPMAPGLbooleanglcIsEnabled()enable
GLC_HINTING_QSOGLbooleanglcIsEnabled()enable
GLC_EXTRUDE_QSOGLbooleanglcIsEnabled()enable
GLC_KERNING_QSOGLbooleanglcIsEnabled()enable
GLC_RENDER_STYLEGLintglcGeti()render
GLC_RESOLUTIONGLfloatglcGetf()render
GLC_STRING_TYPEGLintglcGeti()string
GLC_REPLACEMENT_CODEGLintglcGeti()string
GLC_OP_glcUnmappedCodeGLCfuncglcGetCallbackFunc()string
GLC_DATA_POINTERGLvoid*glcGetPointer()string

The error GLC_STACK_OVERFLOW_QSO is generated if glcPushAttribQSO() is executed while the attribute stack depth is equal to GLC_MAX_ATTRIB_STACK_DEPTH_QSO. GLC_STACK_OVERFLOW_QSO.

Parameters
inMaskThe list of state variables to be saved
See also
glcPopAttribQSO()
glcGeti() with argument GLC_ATTRIB_STACK_DEPTH_QSO
glcGeti() with argument GLC_MAX_ATTRIB_STACK_DEPTH_QSO

◆ glcPopAttribQSO()

void glcPopAttribQSO ( void )

This command resets the values of those state variables that were saved with the last corresponding glcPushAttribQSO().

Those not saved remain unchanged. The error GLC_STACK_UNDERFLOW_QSO is generated if glcPopAttrib() is executed while the attribute stack is empty.

See also
glcPushAttribQSO()
glcGeti() with argument GLC_ATTRIB_STACK_DEPTH_QSO
glcGeti() with argument GLC_MAX_ATTRIB_STACK_DEPTH_QSO

Generated for QuesoGLC by doxygen 1.14.0 written by Dimitri van Heesch © 1997-2005