1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#version 330 core layout(location = 0) in vec3 apos; out vec3 tex_coords; layout(std140) uniform Matrices { uniform mat4 projection; uniform mat4 view; }; void main(void) { tex_coords = apos; vec4 pos = projection*view*vec4(apos, 1.0); gl_Position = pos.xyww; }