Name
cgGLRegisterStates - registers graphics pass states for CgFX files
Synopsis
#include <Cg/cgGL.h>
void cgGLRegisterStates( CGcontext context );
Parameters
- context
-
The context in which to register the states.
Return Values
None.
Description
cgGLRegisterStates registers a set of states for the passes in a
CgFX effect file. These states correspond to the set of OpenGL state that
is relevant and/or useful to be setting in passes in effect files. See the
Cg User's Guide for complete documentation of the
states that are made
available after calling cgGLRegisterStates.
Examples
CGcontext context = cgCreateContext();
HGLRC glcontext = wglCreateContext(hdc);
wglMakeCurrent(hdc, glcontext);
cgGLRegisterStates(context);
Errors
CG_INVALID_CONTEXT_HANDLE_ERROR is generated if context is not a valid context.
History
cgGLRegisterStates was introduced in Cg 1.4.
Starting with Cg 2.2, cgGLRegisterStates calls
cgSetStateLatestProfile for program states it
creates and registers the latest profile returned by
cgGLGetLatestProfile for the appropriate
program domain.
See Also
cgCreateState,
cgSetStateLatestProfile,
cgSetPassState,
cgResetPassState,
cgCallStateValidateCallback,
cgD3D9RegisterStates
|