I managed to figure it out, the vertex shader needs to include the model view projection matrix:
Vertex shader:
#version 150
// Uniform inputs
uniform mat4 p3d_ModelViewProjectionMatrix;
// Vertex inputs
in vec4 p3d_Vertex;
in vec2 p3d_MultiTexCoord0;
// Output to fragment shader
out vec2 texcoord;
void main() {
gl_Position = p3d_ModelViewProjectionMatrix * p3d_Vertex;
texcoord = p3d_MultiTexCoord0;
}
It’s as simple as that.
I also got the card to appear correctly in the frame using:
card.setZ(-1)
card.setX(-1)
card.setScale(2)