2bdc165572
Poseable is not a struct because it has a vtable. This means that it cannot be used easily with glVertexAttribPointer. This quick fix should be overwritten by a full fix that stores the matrix data in a seperate vector and modifies the matrices with poseable interfaces. (Will go into more detail in that commit.)
14 lines
332 B
GLSL
14 lines
332 B
GLSL
#version 430
|
|
layout(location = 0) in vec3 vertex_position;
|
|
layout(location = 1) in vec4 vertex_color;
|
|
layout(location = 2) in mat4 m;
|
|
|
|
// TODO: Try this with location 0
|
|
layout(location = 6) uniform mat4 pv;
|
|
|
|
out vec4 fragment_color;
|
|
void main()
|
|
{
|
|
fragment_color = vertex_color;
|
|
gl_Position = pv * m * vec4(vertex_position, 1.0);
|
|
} |