NAME
cgGetSupportedProfile - get a supported profile by index
SYNOPSIS
#include <Cg/cg.h> CGprofile cgGetSupportedProfile( int index );PARAMETERS
- index
The index for the supported profile.
RETURN VALUES
Returns the supported CGprofile at position index.
Returns the CG_PROFILE_UNKNOWN if an error occurs.
DESCRIPTION
cgGetSupportedProfile retrieves by index a profile supported by this version of the Cg library. The number of supported profiles can be found using cgGetNumSupportedProfiles.
Note that a profile may be recognized by Cg but not supported by the platform on which the application is currently running. A graphics API specific routine such as cgGLIsProfileSupported must still be used to determine if the current GPU and driver combination supports a given profile.
EXAMPLES
CGprofile profile; int nProfiles; int ii; nProfiles = cgGetNumSupportedProfiles(); printf("NumSupportedProfiles: %i\n", nProfiles); for (ii=0; ii<nProfiles; ++ii) { profile = cgGetSupportedProfile(ii); printf("SupportedProfile %i: %s %i\n", ii, cgGetProfileString(profile), profile); }ERRORS
CG_INVALID_PARAMETER_ERROR is generated if index is less than 0 or greater than or equal to the number of supported profiles returned by cgGetNumSupportedProfiles.
HISTORY
cgGetSupportedProfile was introduced in Cg 2.2.
SEE ALSO
cgGetNumSupportedProfiles, cgIsProfileSupported, cgGetProfileProperty, cgGLIsProfileSupported, cgD3D9IsProfileSupported, cgD3D10IsProfileSupported, cgGetProfileString, cgGetProfile