#version 410 layout (std140) uniform model_block { mat4 M; }; uniform mat4 model, view, proj; layout(location = 0) in vec3 vertex_position; layout(location = 1) in vec3 vertex_color; out vec3 color; void main() { color = vertex_color; gl_Position = proj * view * model * vec4(vertex_position, 1.0); }