1 # From the ARB_cull_distance spec:
3 # The gl_CullDistance array is predeclared as unsized and must be sized by
4 # the shader either redeclaring it with a size or indexing it only with
5 # integral constant expressions. The size determines the number and set of
6 # enabled cull distances and can be at most gl_MaxCullDistances.
8 # This test checks that the size of gl_CullDistance can be set to
9 # gl_MaxCullDistances without error, and that this actually causes the
10 # size of the array to be set properly.
18 #extension GL_ARB_cull_distance: enable
19 out float gl_CullDistance[gl_MaxCullDistances];
23 gl_Position = gl_Vertex;
28 #extension GL_ARB_cull_distance: enable
29 in float gl_CullDistance[gl_MaxCullDistances];
33 gl_FragColor = (gl_CullDistance.length() == gl_MaxCullDistances)
34 ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
39 probe all rgba 0.0 1.0 0.0 1.0