Shaders extensions

Hello all,
This is probably a newbie questions…

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?

Need your help to clear things up.
Many thanks,

Yossi

Programs are one thing. Shaders are another. Programs are the asm version of shaders, or shader are the high level equivalent of programs.

So, fragment/vertex_program is all you need to have program (equivalent to D3D’s VS/PS).

And vertex/fragment_shader, shader_objects and shading_language_100 for shaders (equivalent to D3D’s HLSL).

Thanks Kronos and good luck in the eurocup :wink:
Yossi

LOL :smiley:
We don’t need luck!!! Muhhahahahahah… :cool:

Forget to mention: you don’t need programs to have shaders. Both extensions are seperate and one doesn’t need the other…

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.

  • ARB_fragment_shader, ARB_vertex_shader, ARB_shading_language_100, ARB_shader_objects

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!)

Thanks you all folks for the info,
and to you Kronos: may the team playing beautiful football win today (You know who I mean :wink: )
Yossi

Hahahah! We will win!!! :smiley:
My home town (Coimbra) hosted a few games, and I’m going to the stadium to watch the game from there from a giant screen… :stuck_out_tongue:

It will be beautifull… :smiley:

If the Greeks win, there will be horn honking all night long and dancing in the streets where I am. Yes really, dancing in the streets!

Nnnnoooooo, we lost… :frowning:
How is the dancing? :wink:

Originally posted by KRONOS:
How is the dancing? :wink:
Unbelievable!!! Just amazing!!!

:slight_smile: :slight_smile: :slight_smile:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.