cgGetProfileProperty(3)

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_VERTEX_PROFILE

    •   CG_IS_FRAGMENT_PROFILE

    •   CG_IS_GEOMETRY_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 :

•   CG_IS_OPENGL_PROFILE

    profile is an OpenGL profile.

•   CG_IS_DIRECT3D_PROFILE

    profile is Direct3D profile.

•   CG_IS_DIRECT3D_8_PROFILE

    profile is Direct3D8 profile.

•   CG_IS_DIRECT3D_9_PROFILE

    profile is Direct3D9 profile.

•   CG_IS_DIRECT3D_10_PROFILE

    profile is Direct3D10 profile.

•   CG_IS_VERTEX_PROFILE

    profile is vertex profile.

•   CG_IS_FRAGMENT_PROFILE

    profile is fragment profile.

•   CG_IS_GEOMETRY_PROFILE

    profile is geometry profile.

•   CG_IS_TRANSLATION_PROFILE

    profile is a translation profile.

•   CG_IS_HLSL_PROFILE

    profile is an HLSL translation profile.

•   CG_IS_GLSL_PROFILE

    profile is a GLSL translation profile.

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_VERTEX_PROFILE, CG_IS_FRAGMENT_PROFILE, CG_IS_GEOMETRY_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