4 // require_extensions: GL_ARB_explicit_attrib_location
7 // Even though the specified locations overlap, the spec says that a *link*
8 // error is generated. The changes to section 2.11.3 say:
10 // "LinkProgram will fail if the attribute bindings assigned by
11 // BindAttribLocation do not leave not enough space to assign a location
12 // for an active matrix attribute or an active attribute array, both of
13 // which require multiple contiguous generic attributes."
15 // However, vertex shader inputs cannot be arrays in GLSL 1.10.
18 #extension GL_ARB_explicit_attrib_location: require
19 layout(location = 0) in vec4 vertex;
20 layout(location = 1) in vec4 colors[4];
21 layout(location = 2) in vec4 normal;
23 out vec4 varying_colors[4];
29 varying_colors[0] = colors[0];
30 varying_colors[1] = colors[1];
31 varying_colors[2] = colors[2];
32 varying_colors[3] = colors[3];