summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhigles2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/rhi/qrhigles2.cpp')
-rw-r--r--src/gui/rhi/qrhigles2.cpp10
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;