Name

cgGLSetDebugMode - control whether the cgGL runtime calls glGetError

Synopsis

#include <Cg/cgGL.h>

void cgGLSetDebugMode( CGbool debug );

Parameters

debug
Flag indicating whether the library should use OpenGL error checking.

Return Values

None.

Description

The OpenGL Cg runtime calls glGetError at various points to verify that no errors have occurred. While this is helpful during development, the resulting performance penalty may be deemed too severe. cgGLSetDebugMode allows the application to turn off the OpenGL error checking if so desired.

Examples

cgGLSetDebugMode( CG_TRUE );  // Enables debug mode
cgGLSetDebugMode( CG_FALSE ); // Disables debug mode

Errors

None.

History

cgGLSetDebugMode was introduced in Cg 1.5.

See Also

cgSetErrorHandler, cgGetError