2 GLSL >= ${major}.${minor}
7 % for type_, name, value in type_list:
8 uniform ${type_} ${name} = ${value};
13 ## This is a little bit complex too look at, but it's actually pretty simple.
14 ## What it does is use the name and type values from type_list, but the values from api_types
15 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))}) {
16 color = vec4(0, 1, 0, 1);
18 color = vec4(1, 0, 0, 1);
21 gl_Position = gl_Vertex;
33 % for api_type, name, values in api_types:
34 uniform ${api_type} ${name} ${" ".join(values)}