Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QOpenGlWidget and QMatrix4x4: how to invert the Y axis?
Violet Giraffe last edited by Violet Giraffe
I have a QOpenGlWidget. The matrix my shader uses is
QMatrix4x4().ortho(rect()). This results in the Y axis being directed from top to bottom, which is familiar, but I need the opposite Y axis direction as is customary in OpenGL. My understanding is I need to multiply the ortho matrix by an appropriate transformation matrix, but how to compose this matrix?
rotate(180.0f, 0.0f, 1.0f, 0.0f)doesn't work, I get no visible image at all with it.
1, 0, 0, 0 0, -1, 0, 0 0, 0, 1, 0 0, 0, 0, 1