Clockworkcoders Tutorials
|
OpenGL Extensions: Part 2OpenGL Shading Language ExtensionsNow we know enough about extensions to actually use them for our GLSL programs.Checking Presence of GLSLTo check if the OpenGL Shading Language is present, the extension "GL_ARB_shading_language_100" must be available. If this extension is present, the actual version of the OpenGL Shading Language can be queried with glGetString(GL_SHADING_LANGUAGE_VERSION_ARB). The format of the returned string is: "major.minor.release vendor_info_string". (with "release" and "vendor_info_string" being optional). Version numbers have 1 or more digits. Unfortunately this is not possible with the initial version of the OpenGL Shading Language. If the query returns an "GL_INVALID_ENUM" error, then you can assume it is version 1.051 (major=1, minor=0, revision=51).
If "GL_ARB_shading_language_100" is present, the other extensions related to the shading language must be present too: "GL_ARB_shader_objects", "GL_ARB_fragment_shader", and "GL_ARB_vertex_shader".
|
![]()

