I am a little bit confused about the profusion of extensions related to shaders.
I mean:
GL_ARB_fragment_shader
GL_ARB_vertex_shader
GL_ARB_fragment_program
GL_ARB_shader_program
GL_ARB_shading_language_100
GL_ARB_shader_objects
and maybe more (?)
What extensions are obligatory to make an OpenGL implementation supporting vertex and fragment shaders?
Programs are one thing. Shaders are another. Programs are the asm version of shaders, or shader are the high level equivalent of programs.
While, in a very technical sense, this is true, it is also very misleading.
A more accurate assessment would be this.
There are two sets of extensions:
ARB_vertex_program, ARB_fragment_program
These expose an assembly-style interface to programmable “shader” hardware.
Are 4 extensions that expose the sum-total of what is know as the “OpenGL Shading Language”, or glslang.
Glslang is a C-like language for programmable hardware, as opposed to the ARB_*_program syntax. The reason it is wrong/confusing to talk about “programs vs shaders” is because glslang has both programs and shaders. A glslang “shader” is the C equivalent of a compiled object file. A glslang “program” is like a compiled executable: a bunch of shaders that have been linked together in a link step to produce a program.
If you’re starting with programmable hardware, I would suggest using glslang exclusively. Despite it’s many problems, it is the future of programmability under OpenGL.
It’s possible to have ARB_vertex_program without ARB_fragment_program and vice versa.
You can also have ARB_vertex_shader without ARB_fragment_shader.
But as long as you have ARB_vertex_shader or ARB_fragment_shader, then GL_ARB_shader_program and GL_ARB_shading_language_100 will be present as well. They have to be present because of dependencies.
I think the only reason they used shader for the later is that program was already taken, and for the previous they called programs because “shader” sounds weird for vertex (You don’t shade vertices!)