cgCreateParameter

Langue: en

Version: 46741 (openSuse - 09/10/07)

Section: 3 (Bibliothèques de fonctions)

NAME

cgCreateParameter - create a parameter

SYNOPSIS


  #include <Cg/cg.h>






  CGparameter cgCreateParameter( CGcontext context,

                                 CGtype type );





PARAMETERS


context
The context to which the new parameter will be added.
type
The type of the new parameter.

RETURN VALUES

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 is generated if context is not a valid context.

HISTORY

cgCreateParameter was introduced in Cg 1.2.

SEE ALSO

the cgCreateParameterArray manpage, the cgCreateParameterMultiDimArray manpage, the cgCreateEffectParameter manpage, the cgDestroyParameter manpage, the cgConnectParameter manpage