How to do Ortho projection properly in Vulkan with GLM?

How to do Ortho projection properly?. With perspective projection everything works well but with ortho projection nothing visible on screen.

The screenshot with perspective projection :

The screenshot with ortho projection :

The screenshot of MeshViewer on Renderdoc with ortho projection :

The code of view projection matrices :

mViewMatrix = glm::lookAt(mPositionVector, mPositionVector + mFrontVector, mUpVector);
mProjectionMatrix = glm::ortho(0.0f, 1280.0f, 0.0f, 720.0f, 0.1f, 1000.0f);

I’ll give more detail when needed.

Update : After bit of relearning projection I found the solution by changine to :

mProjectionMatrix = glm::ortho(0.0f, 1.0f, 1.0f, 0.0f, 0.1f, 1000.0f);

Sorry for wasting your time.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.