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
|