1#version 430 2 3// Error: Block has different members 4layout (std140) uniform Block 5{ 6 mat4 uProj; 7}; 8 9// Error: BufferBlock has different members 10buffer BufferBlock 11{ 12 vec4 b; 13}; 14 15// Error: Vertex has different members 16out Vertex 17{ 18 vec4 v1; 19}; 20 21// Error: ColorBlock has different members 22layout (std140) uniform ColorBlock 23{ 24 vec4 color1; 25 vec4 color2; 26 // Error, redeclare varaible in another anonymous block 27 vec4 v1; 28}; 29 30// Error: NamedBlock is anonymous in other compilation unit 31layout (std140) uniform NamedBlock 32{ 33 mat4 m; 34} myName; 35 36vec4 getWorld(); 37vec4 getColor2(); 38 39out vec4 oColor; 40 41// Error: redeclare varaibles that are in anonymous blocks 42out vec4 v1; 43uniform mat4 uProj; 44 45void 46main() 47{ 48 oColor = color1 * getColor2(); 49 v1 = color1; 50 51 gl_Position = uProj * getWorld(); 52} 53