From d3c985631dceef1209c74958baac881d9a67061b Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 23 Sep 2020 14:48:21 +0200 Subject: rhi: gl: Enable seamless cubemap filtering ...when available. This is mandatory in order to match results with other APIs where this is always on. Change-Id: I3b8ef2cb806a7297c83e60a3eb1fa71b50780dbe Reviewed-by: Andy Nichols --- src/gui/rhi/qrhigles2.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gui/rhi/qrhigles2.cpp') diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index a65fcdb919..6f140487d6 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -313,6 +313,10 @@ QT_BEGIN_NAMESPACE #define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF #endif +#ifndef GL_TEXTURE_CUBE_MAP_SEAMLESS +#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F +#endif + /*! Constructs a new QRhiGles2InitParams. @@ -568,6 +572,12 @@ bool QRhiGles2::create(QRhi::Flags flags) f->glEnable(GL_POINT_SPRITE); } // else (with gles) these are always on + // Match D3D and others when it comes to seamless cubemap filtering. + // ES 3.0+ has this always enabled. (hopefully) + // ES 2.0 and GL < 3.2 will not have it. + if (!caps.gles && (caps.ctxMajor > 3 || (caps.ctxMajor == 3 && caps.ctxMinor >= 2))) + f->glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); + nativeHandlesStruct.context = ctx; contextLost = false; -- cgit v1.2.3