GLSL version for layout qualifier

I’d like to know when was layout qualifiers (layout in, layout out, etc.) introduced to GLSL (version number), and what was used prior to them to set for example in geometry shader output primitive type (which is now layout(triangle_strip) out).
Is it possible to enable this in earlier versions by setting some extension, or it’s only defined by version used.

Also for next time, I’d like to ask where I can find similiar info - what was introduced in which version.

Geometry shaders were made core in 3.2, so that’s GLSL version 1.50. Also, layout qualifiers were introduced in 3.1 (GLSL 1.40), but they could only be applied to uniforms.

And no, there is no way to use them before 1.50. The ARB_geometry_shader4 extension doesn’t allow you to set the input and output primitive types in the actual shader itself. They are set as shader compilation parameters.

Also for next time, I’d like to ask where I can find similiar info - what was introduced in which version.

Read the OpenGL specifications. They have a pretty detailed history of what was incorporated into each version.

In 2006, geometry shaders were exposed via EXT_geometry_shader4. The layout qualifier data was set via glProgramParameteriEXT().

See the wiki.

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