Add viewport transform to QMatrix4x4
authorSean Harmer <sean.harmer@kdab.com>
Sat, 19 Apr 2014 15:36:35 +0000 (16:36 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 16 May 2014 07:53:58 +0000 (09:53 +0200)
commitca15825ed4a1d4c8642c2292760726ebdcda863b
treeca28f9e9d3938386379b3c963d475382fca86166
parent71fb3633e8d909e9a91e1bee6eaf53c146f25998
Add viewport transform to QMatrix4x4

This allows to easily create a matrix that performs the transformation
used by OpenGL fixed function to go from normalized device coordinates
to window coordinates.

This comes in useful if you need to perform the NDC->window coordinate
conversion inside a shader.

Change-Id: I183b3545bfb3eb1e8b13fc3172911b46926fcbb7
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
src/gui/math3d/qmatrix4x4.cpp
src/gui/math3d/qmatrix4x4.h
tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp