summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/render/renderers/opengl/renderer/renderview.cpp1
-rw-r--r--src/render/renderers/opengl/textures/gltexture.cpp12
2 files changed, 6 insertions, 7 deletions
diff --git a/src/render/renderers/opengl/renderer/renderview.cpp b/src/render/renderers/opengl/renderer/renderview.cpp
index 5845fe147..378cb02ab 100644
--- a/src/render/renderers/opengl/renderer/renderview.cpp
+++ b/src/render/renderers/opengl/renderer/renderview.cpp
@@ -425,7 +425,6 @@ struct SubRangeSorter<QSortPolicy::Texture>
QVector<ShaderParameterPack::NamedResource> texturesB = b->m_parameterPack.textures();
const int originalTextureASize = texturesA.size();
- const bool isSuperior = originalTextureASize > texturesB.size();
if (texturesB.size() > texturesA.size())
qSwap(texturesA, texturesB);
diff --git a/src/render/renderers/opengl/textures/gltexture.cpp b/src/render/renderers/opengl/textures/gltexture.cpp
index 93348d0b0..11d2c2be9 100644
--- a/src/render/renderers/opengl/textures/gltexture.cpp
+++ b/src/render/renderers/opengl/textures/gltexture.cpp
@@ -474,15 +474,15 @@ QOpenGLTexture *GLTexture::buildGLTexture()
QAbstractTexture::TextureFormat format = m_properties.format;
if (ctx->isOpenGLES() && ctx->format().majorVersion() < 3) {
switch (m_properties.format) {
- case QOpenGLTexture::RGBA8_UNorm:
- case QOpenGLTexture::RGBAFormat:
+ case QAbstractTexture::RGBA8_UNorm:
+ case QAbstractTexture::RGBAFormat:
format = QAbstractTexture::RGBAFormat;
break;
- case QOpenGLTexture::RGB8_UNorm:
- case QOpenGLTexture::RGBFormat:
+ case QAbstractTexture::RGB8_UNorm:
+ case QAbstractTexture::RGBFormat:
format = QAbstractTexture::RGBFormat;
break;
- case QOpenGLTexture::DepthFormat:
+ case QAbstractTexture::DepthFormat:
format = QAbstractTexture::DepthFormat;
break;
default:
@@ -682,8 +682,8 @@ void GLTexture::introspectPropertiesFromSharedTextureId()
const QPair<int, int> ctxGLVersion = ctx->format().version();
if (ctxGLVersion.first > 4 || (ctxGLVersion.first == 4 && ctxGLVersion.second >= 5)) {
// Only for GL 4.5+
- QOpenGLFunctions_4_5_Core *gl5 = ctx->versionFunctions<QOpenGLFunctions_4_5_Core>();
#ifdef GL_TEXTURE_TARGET
+ QOpenGLFunctions_4_5_Core *gl5 = ctx->versionFunctions<QOpenGLFunctions_4_5_Core>();
if (gl5 != nullptr)
gl5->glGetTextureParameteriv(m_sharedTextureId, GL_TEXTURE_TARGET, reinterpret_cast<int *>(&m_properties.target));
#endif