1 # Test linking a geometry shader without vertex shader
2 # with only built-in input varyings, without EXT_separate_shader_objects
5 # From the ARB_geometry_shader4 spec (section 2.15.2):
6 # "Linking will also fail if the program object contains objects to form a
7 # geometry shader [...], but no objects to form a vertex shader"
9 # From the EXT_separate_shader_objects spec (Errors section):
10 # "LinkProgram NO LONGER generates an INVALID_OPERATION if the program object
11 # has a geometry shader attached and no vertex shader attached as long as the
12 # geometry shader uses only built-in varying input variables."
16 GL_ARB_geometry_shader4
17 !GL_EXT_separate_shader_objects
21 #extension GL_ARB_geometry_shader4: enable
25 for (int i = 0; i < 3; i++) {
26 gl_Position = gl_PositionIn[i];
32 input type GL_TRIANGLES
33 output type GL_TRIANGLE_STRIP
41 gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);