Cg OpenGL Runtime API cgGLGetLatestProfile(3)
NAME
cgGLGetLatestProfile - get the latest profile for a profile
class
SYNOPSIS
#include
CGprofile cgGLGetLatestProfile( CGLenum profileClass );
PARAMETERS
profileClass
The class of profile that will be returned. Must be
one of the following :
]o CGLVERTEX
]o CGLGEOMETRY
]o CGLFRAGMENT
RETURN VALUES
Returns a profile enumerant for the latest profile of the
given class.
Returns CGPROFILEUNKNOWN if no appropriate profile is
available or an error occurs.
DESCRIPTION
cgGLGetLatestProfile returns the best available profile of a
given class. The OpenGL extensions are checked to determine
the best profile which is supported by the current GPU,
driver, and cgGL library combination.
profileClass may be one of the following enumerants :
]o CGLVERTEX
The latest available vertex profile will be returned.
]o CGLGEOMETRY
The latest available geometry profile will be returned.
]o CGLFRAGMENT
The latest available fragment profile will be returned.
cgGLGetLatestProfile can be used in conjuction with
cgCreateProgram to ensure that more optimal profiles are
used as they are made available, even though they might not
have been available at compile time or with a different
version of the runtime.
EXAMPLES
Cg Toolkit 2.1 Last change: 1
Cg OpenGL Runtime API cgGLGetLatestProfile(3)
/* Output information about available profiles */
printf("vertex profile: %s\n",
cgGetProfileString(cgGLGetLatestProfile(CGLVERTEX)));
printf("geometry profile: %s\n",
cgGetProfileString(cgGLGetLatestProfile(CGLGEOMETRY)));
printf("fragment profile: %s\n",
cgGetProfileString(cgGLGetLatestProfile(CGLFRAGMENT)));
ERORS
CGINVALIDENUMERANTEROR is generated if profileClass is
not CGLVERTEX, CGLGEOMETRY or CGLFRAGMENT.
HISTORY
cgGLGetLatestProfile was introduced in Cg 1.1.
CGLGEOMETRY support was introduced in Cg 2.0.
SEE ALSO
cgGLSetOptimalOptions, cgCreateProgram
Cg Toolkit 2.1 Last change: 2
|