4 GL_ARB_tessellation_shader
7 [vertex shader passthrough]
10 [tessellation control shader]
11 #extension GL_ARB_tessellation_shader: require
12 layout(vertices = 3) out;
17 gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
18 gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 0.0);
19 gl_TessLevelInner = float[2](0.0, 0.0);
20 color[gl_InvocationID] = vec4(0, 1, 0, 1);
24 [tessellation evaluation shader]
25 #extension GL_ARB_tessellation_shader: require
32 gl_Position = gl_in[0].gl_Position * gl_TessCoord[0]
33 + gl_in[1].gl_Position * gl_TessCoord[1]
34 + gl_in[2].gl_Position * gl_TessCoord[2];
36 color_fs = color[0] * gl_TessCoord[0]
37 + color[1] * gl_TessCoord[1]
38 + color[2] * gl_TessCoord[2];
47 gl_FragColor = color_fs;
60 clear color 0.1 0.1 0.1 0.1
64 patch parameter vertices 3
65 draw arrays GL_PATCHES 0 6
68 # make sure we haven't drawn anything yet
69 probe all rgba 0.1 0.1 0.1 0.1
71 # Set wrong patch param to make sure the call list is respected
72 patch parameter vertices 4
75 probe all rgba 0.0 1.0 0.0 1.0
79 clear color 0.1 0.1 0.1 0.1
82 # make sure we haven't drawn anything yet
83 probe all rgba 0.1 0.1 0.1 0.1
85 newlist GL_COMPILE_AND_EXECUTE
86 patch parameter vertices 3
87 draw arrays GL_PATCHES 0 6
90 probe all rgba 0.0 1.0 0.0 1.0