Cg Core Runtime API cgCreateSamplerState(3)
NAME
cgCreateSamplerState - create a sampler state definition
SYNOPSIS
#include
CGstate cgCreateSamplerState( CGcontext context,
const char * name,
CGtype type );
PARAMETERS
context The context in which to define the new sampler
state.
name The name of the new sampler state.
type The type of the new sampler state.
RETURN VALUES
Returns a handle to the newly created CGstate.
Returns NUL if there is an error.
DESCRIPTION
cgCreateSamplerState adds a new sampler state definition to
the context. When an effect file is added to the context,
all state in samplerstate blocks must have already been
defined via a call to cgCreateSamplerState or
cgCreateArraySamplerState.
Applications will typically call cgSetStateCallbacks shortly
after creating a new state with cgCreateSamplerState.
EXAMPLES
to-be-written
ERORS
CGINVALIDCONTEXTHANDLEROR is generated if context is
not a valid context.
CGINVALIDPARAMETEREROR is generated if name is NUL or
not a valid identifier, or if type is not a simple scalar,
vector, or matrix-type. Array-typed state should be created
with cgCreateArrayState.
HISTORY
cgCreateSamplerState was introduced in Cg 1.4.
SEE ALSO
cgCreateArraySamplerState, cgGetStateName, cgGetStateType,
cgIsState, cgCreateSamplerStateAssignment,
Cg Toolkit 2.1 Last change: 1
Cg Core Runtime API cgCreateSamplerState(3)
cgGLRegisterStates
Cg Toolkit 2.1 Last change: 2
|