2 GLSL >= ${major}.${minor}
8 gl_Position = gl_Vertex;
13 % for type_, name, value in type_list:
14 uniform ${type_} ${name} = ${value};
19 ## This is a little bit complex too look at, but it's actually pretty simple.
20 ## What it does is use the name and type values from type_list, but the values from api_types
21 if (${' && '.join('{0} == {1}({2})'.format(n, t, ', '.join(api_types[i][2])) for i, (t, n, _) in enumerate(type_list[1:-1], start=1))}) {
22 gl_FragColor = vec4(0, 1, 0, 1);
24 gl_FragColor = vec4(1, 0, 0, 1);
29 % for api_type, name, values in api_types:
30 uniform ${api_type} ${name} ${" ".join(values)}