1 # simple test using one shader subroutine.
5 GL_ARB_shader_subroutine
7 [vertex shader passthrough]
11 #extension GL_ARB_shader_subroutine: enable
15 subroutine vec4 getcolor();
16 subroutine uniform getcolor GetColor;
21 return vec4(1.0, 0.0, 0.0, 1.0);
27 return vec4(0.0, 1.0, 0.0, 1.0);
37 clear color 0.0 0.0 1.0 0.0
39 subuniform GL_FRAGMENT_SHADER GetColor color_red
41 probe all rgba 1.0 0.0 0.0 1.0
42 subuniform GL_FRAGMENT_SHADER GetColor color_green
44 probe all rgba 0.0 1.0 0.0 1.0