summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhigles2.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2023-06-06 12:52:05 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2023-06-07 13:39:42 +0200
commit6ec01168d1c517bedf8039ba27f8059ca29478f4 (patch)
tree5283b571883c5497d7d2c125513007c83019f9f3 /src/gui/rhi/qrhigles2.cpp
parent3ab7b7e23023a223392ae67514ff7ec73126ac42 (diff)
rhi: gl: Switch back to Nearest filtering when resolving
...for Qt 5 compatibility. It seems both Qt Gui and Quick calls the QOpenGLFramebufferObject helper for blitFramebuffer with the default GL_NEAREST argument for the filtering. In Qt 6 we must use the same if we want to ensure pixel-perfect compatibility. Pick-to: 6.6 6.5 Task-number: QTBUG-113811 Change-Id: I03c69448265e7b0d73f021d71135a1725e96fcbc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhigles2.cpp')
-rw-r--r--src/gui/rhi/qrhigles2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp
index 37e3373c21..774dec310f 100644
--- a/src/gui/rhi/qrhigles2.cpp
+++ b/src/gui/rhi/qrhigles2.cpp
@@ -3433,7 +3433,7 @@ void QRhiGles2::executeCommandBuffer(QRhiCommandBuffer *cb)
f->glBlitFramebuffer(0, 0, cmd.args.blitFromRb.w, cmd.args.blitFromRb.h,
0, 0, cmd.args.blitFromRb.w, cmd.args.blitFromRb.h,
GL_COLOR_BUFFER_BIT,
- GL_LINEAR);
+ GL_NEAREST); // Qt 5 used Nearest when resolving samples, stick to that
f->glBindFramebuffer(GL_FRAMEBUFFER, ctx->defaultFramebufferObject());
f->glDeleteFramebuffers(2, fbo);
}