GLM::ORTHO reverts Y-axis. Why?

I’m using GLM library. And when I initialize orthographic perspective the Y-axis gets reverted, the positive becomes down. How do I revert it so that the positive is up but still use glm::ortho? Thanks.

glm::mat4 projection_mat = glm::ortho((float)leop_opengl_window.getWidth()*-1.0f, (float)leop_opengl_window.getWidth(), (float)leop_opengl_window.getHeight(), (float)leop_opengl_window.getHeight()*-1.0f);

Swap your bottom and top arguments.

In OpenGL, the Y axis points up (in eye space and NDC space). So your bottom should be less than your top, unless you intentionally want to flip the orientation vertically.

See:

[ul]
[li]FAQ#How_to_render_in_pixel_space [/li][li]Flip Y-axis in OpenGL ES? [/li][/ul]