Name

cgGetNumSupportedProfiles - get the number of supported profiles

Synopsis

#include <Cg/cg.h>

int cgGetNumSupportedProfiles( void );

Parameters

None.

Return Values

Returns the number of profiles supported by this version of Cg.

Description

cgGetNumSupportedProfiles provides the number of profiles which are supported by this version of the Cg library.

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),
                               cgGetProfile(cgGetProfileString(profile)));
}

Errors

None.

History

cgGetNumSupportedProfiles was introduced in Cg 2.2.

See Also

cgGetSupportedProfile, cgIsProfileSupported, cgGetProfileProperty, cgGLIsProfileSupported, cgD3D9IsProfileSupported, cgD3D10IsProfileSupported, cgGetProfileString, cgGetProfile