pixel offset fixed

This commit is contained in:
Uwe Rathmann 2018-10-05 15:43:47 +02:00
parent 1d0058a42c
commit 1ddb7aee6b

View File

@ -57,14 +57,9 @@ static uint qskCreateTextureOpenGL(
QOpenGLFramebufferObject fbo( width, height, format2 );
/*
Mirror vertically to be compliant with what QQuickTextureFactory expects.
for some reason we have to add 1 pixel to avoid that the mirrored
image gets cut off.
*/
// Mirror vertically
const QRect sourceRect( 0, 0, width, height );
const QRect targetRect( 0, height + 1, width, -height );
const QRect targetRect( 0, height, width, -height );
QOpenGLFramebufferObject::blitFramebuffer(
&fbo, sourceRect, &multisampledFbo, targetRect );