NAME
cgGLGetLatestProfile - enable a profile within OpenGL
SYNOPSIS
#include <Cg/cgGL.h> CGprofile cgGLGetLatestProfile(CGGLenum profile_type);PARAMETERS
- profile_type
The class of profile that will be returned. profile_type may be one of :
- CG_GL_VERTEX
For the latest vertex profile.
- CG_GL_FRAGMENT
For the latest fragment profile.
DESCRIPTION
cgGLGetLatestProfile returns the best available profile of a given class. It will check the available OpenGL extensions to see what the determine the best profile.
cgGLGetLatestProfile may be used in conjuction with cgCreateProgram to ensure that more optimal profiles are used as they are made available even though they might not be available at compile time or with a given version of the runtime.
RETURN VALUES
cgGLGetLatestProfile returns a profile enumerant for the latest profile of the given class. If no appropriate profile is available or an error occurs CG_PROFILE_UNKNOWN is returned.
ERRORS
CG_INVALID_ENUMERANT_ERROR is generated if profile_type is invalid.
SEE ALSO