Name

cgGetProfile - get the profile enumerant from a profile name

Synopsis

#include <Cg/cg.h>

CGprofile cgGetProfile( const char * profile_string );

Parameters

profile_string
A string containing the case-sensitive profile name.

Return Values

Returns the profile enumerant of profile_string.

Returns CG_PROFILE_UNKNOWN if the given profile does not exist.

Description

cgGetProfile returns the enumerant assigned to a profile name.

Examples

CGprofile ARBVP1Profile = cgGetProfile("arbvp1");

if(cgGetProgramProfile(myprog) == ARBVP1Profile)
{
  /* Do stuff */
}

Errors

CG_INVALID_PARAMETER_ERROR is generated if profile_string is NULL.

History

cgGetProfile was introduced in Cg 1.1.

See Also

cgGetProfileString, cgGetProgramProfile