Passing data is not the issue since if my projection matrix is also an identity, the rectangle reappears. setPerspective(3.14159 / 2, width / height, 0.1, 100) - and set MVP = projection * view * model, the rectangle disappears entirely. However, when I introduce the projection matrix - generated by. Setting the MVP matrix to view * model produces a coloured rectangle in correct NDC coordinates. My camera sits at (0,0,1) and has the rotation of (0,0,0) (pitch, yaw, roll) so looks towards the negative z-axis. I wish to display a rectangle in OpenGL by passing vertex coordinates and the MVP matrix into the vertex shader (then fragment shader).
0 Comments
Leave a Reply. |