cgGetEffectName(3)

NAME
cgGetEffectName - get an effect's name

SYNOPSIS
  #include <Cg/cg.h>
  const char * cgGetEffectName( CGeffect effect );

PARAMETERS
The effect from which the name will be retrieved.

RETURN VALUES
Returns the name from the specified effect.

Returns NULL if the effect doesn't have a valid name or an error occurs.

DESCRIPTION
cgGetEffectName returns the name from the specified 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 */
  }
  const char* testName = cgGetEffectName(effect);
  if (strcmp(testName, myEffectName)) {
    /* shouldn't be here */
  }

ERRORS
CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.

HISTORY
cgGetEffectName was introduced in Cg 1.5.

SEE ALSO
cgSetEffectName