NAME

cgGetResource - get the resource enumerant assigned to a resource name

SYNOPSIS

  #include <Cg/cg.h>

  CGresource cgGetResource( const char * resource_string );

PARAMETERS

resource_string

A string containing the resource name.

RETURN VALUES

Returns the resource enumerant of resource_string.

Returns CG_UNKNOWN if no such resource exists.

DESCRIPTION

cgGetResource returns the enumerant assigned to a resource name.

EXAMPLES

  CGresource PositionResource = cgGetResource("POSITION");

  if(cgGetParameterResource(myparam) == PositionResource)
  {
    /* Do stuff to the "POSITION" parameter */
  }

ERRORS

None.

HISTORY

cgGetResource was introduced in Cg 1.1.

SEE ALSO

cgGetResourceString, cgGetParameterResource