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