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>bb10
parent
7c483a251b
commit
d3c985631d
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue