plugins/screenshot: Invert render transforms in the correct order
The render transform is applied first, after that, the texture is flipped implicitly by opengl. So in order to undo these transforms, we need to flip the image vertically first, then undo the render target transform.
This commit is contained in:
parent
16809e6b15
commit
27821e3c76
1 changed files with 2 additions and 2 deletions
|
@ -76,10 +76,10 @@ static void convertFromGLImage(QImage &img, int w, int h, const OutputTransform
|
|||
}
|
||||
|
||||
QMatrix4x4 matrix;
|
||||
// OpenGL textures are flipped vs QImage
|
||||
matrix.scale(1, -1);
|
||||
// apply render target transformation
|
||||
matrix *= renderTargetTransformation.inverted().toMatrix();
|
||||
// OpenGL textures are flipped vs QImage
|
||||
matrix.scale(1, -1);
|
||||
img = img.transformed(matrix.toTransform());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue