cgCreateArrayState(3)

NAME
cgCreateArrayState - create an array-typed state definition

SYNOPSIS
  #include <Cg/cg.h>
  CGstate cgCreateArrayState( CGcontext context,
                              const char * name,
                              CGtype type,
                              int nelements );

PARAMETERS
The context in which to define the state. The name of the new state. The type of the new state. The number of elements in the array.

RETURN VALUES
Returns a handle to the newly created CGstate.

Returns NULL if there is an error.

DESCRIPTION
cgCreateArrayState adds a new array-typed state definition to context. Before a CgFX file is added to a context, all state assignments in the file must have previously been defined via a call to the cgCreateState manpage or cgCreateArrayState.

Applications will typically call the cgSetStateCallbacks manpage shortly after creating a new state with cgCreateArrayState.

EXAMPLES
to-be-written

ERRORS
CG_INVALID_CONTEXT_HANDLE_ERROR is generated if context is not a valid context.

CG_INVALID_PARAMETER_ERROR is generated if name is NULL or not a valid identifier, if type is not a simple scalar, vector, or matrix-type, or if nelements is not a positive number.

HISTORY
cgCreateArrayState was introduced in Cg 1.4.

SEE ALSO
the cgGetStateContext manpage, the cgGetStateName manpage, the cgGetStateType manpage, the cgIsState manpage, the cgSetStateCallbacks manpage, the cgGLRegisterStates manpage