diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-09-23 14:48:21 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-09-23 17:35:03 +0200 |
commit | d3c985631dceef1209c74958baac881d9a67061b (patch) | |
tree | ef2cda58e3cb88df9e73db3a02f3dc09f3c053ed /src/gui/rhi | |
parent | 7c483a251b446f8cc6df35e7ce370225cc2c6e49 (diff) |
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 <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi')
-rw-r--r-- | src/gui/rhi/qrhigles2.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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; |