NAME

cgGetProfileProperty - query property of a profile

SYNOPSIS

  #include <Cg/cg.h>

  CGbool cgGetProfileProperty( CGprofile profile, CGenum query );

PARAMETERS

profile

The profile to query.

query

An enumerant describing the property to be queried. The following enumerants are allowed:

  • CG_IS_OPENGL_PROFILE
  • CG_IS_DIRECT3D_PROFILE
  • CG_IS_DIRECT3D_8_PROFILE
  • CG_IS_DIRECT3D_9_PROFILE
  • CG_IS_DIRECT3D_10_PROFILE
  • CG_IS_DIRECT3D_11_PROFILE
  • CG_IS_VERTEX_PROFILE
  • CG_IS_FRAGMENT_PROFILE
  • CG_IS_GEOMETRY_PROFILE
  • CG_IS_TESSELLATION_CONTROL_PROFILE
  • CG_IS_TESSELLATION_EVALUATION_PROFILE
  • CG_IS_TRANSLATION_PROFILE
  • CG_IS_HLSL_PROFILE
  • CG_IS_GLSL_PROFILE

RETURN VALUES

Returns CG_TRUE if profile holds the property expressed by query.

Returns CG_FALSE otherwise.

DESCRIPTION

cgGetProfileProperty returns property information about the given profile.

query must be one of the following enumerants :

EXAMPLES

    CGprofile profile;
    int nProfiles;
    int ii;

    nProfiles = cgGetNumSupportedProfiles();
    printf("NumSupportedProfiles: %i\n", nProfiles);

    for (ii=0; ii<nProfiles; ++ii) {
        profile = cgGetSupportedProfile(ii);
        if (cgGetProfileProperty(profile, CG_IS_OPENGL_PROFILE)) {
            printf("%s is an OpenGL profile\n", cgGetProfileString(profile));
        } else {
            printf("%s is not an OpenGL profile\n", cgGetProfileString(profile));
        }
    }

ERRORS

CG_INVALID_PARAMETER_ERROR is generated if profile is not supported by this version of the Cg library.

CG_INVALID_ENUMERANT_ERROR is generated if query is not CG_IS_OPENGL_PROFILE, CG_IS_DIRECT3D_PROFILE, CG_IS_DIRECT3D_8_PROFILE, CG_IS_DIRECT3D_9_PROFILE, CG_IS_DIRECT3D_10_PROFILE, CG_IS_DIRECT3D_11_PROFILE, CG_IS_VERTEX_PROFILE, CG_IS_FRAGMENT_PROFILE, CG_IS_GEOMETRY_PROFILE, CG_IS_TESSELLATION_CONTROL_PROFILE, CG_IS_TESSELLATION_EVALUATION_PROFILE, CG_IS_TRANSLATION_PROFILE, CG_IS_HLSL_PROFILE, or CG_IS_GLSL_PROFILE

HISTORY

cgGetProfileProperty was introduced in Cg 2.2.

SEE ALSO

cgGetNumSupportedProfiles, cgGetSupportedProfile, cgIsProfileSupported, cgGetProfileString, cgGetProfile