NAME
cgGLBindProgram - prepares a program for binding
SYNOPSIS
#include <Cg/cgGL.h> void cgGLBindProgram(CGprogram prog);PARAMETERS
- prog
Specifies the program.
DESCRIPTION
cgGLBindProgram binds a program to the current state. The program must have been loaded with cgGLLoadProgram before it can be bound. Also, the profile of the program must be enabled for the binding to work. This may be done with the cgGLEnableProfile function.
cgGLBindProgram will reset all uniform parameters that were set with the cgGLSetXXXXX() functions for profiles that do not support program local parameters (e.g. the vp20 profile).
RETURN VALUES
cgGLBindProgram does not return any values.
ERRORS
CG_INVALID_PROFILE_ERROR is generated if prog's profile is not a supported OpenGL profile.
CG_INVALID_PROGRAM_HANDLE_ERROR is generated if prog is not a valid program.
CG_PROGRAM_BIND_ERROR is generated if the program fails to bind for any reason.
SEE ALSO
the "cgGLLoadProgram" document, the "cgGLSetParameter" document, the "cgGLSetMatrixParameter" document, and the "cgGLSetTextureParameter" document,