Name
cgGLDetectGLSLVersion - detect the GLSL version of the current OpenGL context
Synopsis
#include <Cg/cgGL.h> CGGLglslversion cgGLDetectGLSLVersion( void );Parameters
None
Return Values
Returns a CGGLglslversion enumerant.
Returns CG_GL_GLSL_DEFAULT if any error occurs.
Description
cgGLDetectGLSLVersion returns the highest GLSL version supported by the current OpenGL context and the Cg Runtime. See glsl for supported GLSL version details.
Examples
/* Create Cg context ... */ /* Create OpenGL context ... */ CGGLglslversion glslVersion = cgGLDetectGLSLVersion(); cgGLSetContextGLSLVersion(context, glslVersion);Errors
None.
History
cgGLDetectGLSLVersion was introduced in Cg 3.1.
See Also