NAME

cgCreateParameter - create a parameter

SYNOPSIS

  #include <Cg/cg.h>

  CGparameter cgCreateParameter( CGcontext context,
                                 CGtype type );

PARAMETERS

context

The context that the new parameter will be added to.

type

The type of the new parameter.

RETURN VALUES

cgCreateParameter returns the handle to the new parameter.

DESCRIPTION

cgCreateParameter creates context level shared parameters. These parameters are primarily used by connecting them to one or more program parameters with cgConnectParameter.

EXAMPLES

  CGcontext context = cgCreateContext();
  CGparameter param = cgCreateParameter(context, CG_FLOAT);

ERRORS

CG_INVALID_VALUE_TYPE_ERROR is generated if type is invalid.

CG_INVALID_CONTEXT_HANDLE_ERROR if context is invalid.

HISTORY

cgCreateParameter was introduced in Cg 1.2.

SEE ALSO

cgCreateParameterArray, cgCreateParameterMultiDimArray, cgDestroyParameter