cgSetEffectName

Langue: en

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

Section: 3 (Bibliothèques de fonctions)

NAME

cgSetEffectName - set the name of an effect

SYNOPSIS


  #include <Cg/cg.h>






  CGbool cgSetEffectName( CGeffect effect,

                          const char * name );





PARAMETERS


effect
The effect in which the name will be set.
name
The new name for effect.

RETURN VALUES

Returns CG_TRUE if it succeeds.

Returns CG_FALSE otherwise.

DESCRIPTION

cgSetEffectName allows the application to set the name of an effect.

EXAMPLES


  char *effectSource = ...;

  CGcontext context = cgCreateContext();

  CGeffect effect = cgCreateEffect(context, effectSource, NULL);






  const char* myEffectName = "myEffectName";

  CGbool okay = cgSetEffectName(effect, myEffectName);

  if (!okay) {

    /* handle error */

  }





ERRORS

CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.

HISTORY

cgSetEffectName was introduced in Cg 1.5.

SEE ALSO

cgGetEffectName, cgCreateEffect