I'm using OpenGL 3.3+, and I'm trying to create an orthographic projection to draw on screen. I have the model data in a buffer:
X Y
0, 0
50, 100
100, 0
And I create my Model-View-Projection matrix as follows:
glm::mat4 projection = glm::ortho(0.f, 100.f, 0.f, 100.f);
glm::mat4 view = glm::lookAt(
glm::vec3(0, 0, 5),
glm::vec3(0, 0, 0),
glm::vec3(0, 1, 0)
);
glm::mat4 model = glm::mat4(1);
glm::mat4 mvp = projection * view * model;
In my debugging efforts, I used the values from the model buffer and did the same operations the shader was doing, but on the CPU using GLM:
glm::vec4 pos(x, y, 1.0, 1.0);
posicao = mvp * posicao;
And got these results:
X Y
-1, -1
0, 1
1, -1
Which were as expected, as the Vertex Shader's code is plain simply multiplying the matrix by the incoming vec4(vec2(x, y), 1, 1). In my understanding, this should've outputted a triangle on my screen, but it's blank. What are some ways I can debug this?