From 8ca94eed444dd407ad56b243dfbc20300cf23a5c Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 19 Aug 2024 12:36:14 +0300 Subject: [PATCH] opengl: Fix a typo in GLTexture::upload() For glTexStorage2D(), we need to check whether texture storage is supported, not that ARGB32 textures are supported. Those are two distinct things. --- src/opengl/gltexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opengl/gltexture.cpp b/src/opengl/gltexture.cpp index 4506dcd9be..37b3fa837d 100644 --- a/src/opengl/gltexture.cpp +++ b/src/opengl/gltexture.cpp @@ -571,7 +571,7 @@ std::unique_ptr GLTexture::upload(const QImage &image) type = GL_UNSIGNED_INT_8_8_8_8_REV; } - if (context->supportsARGB32Textures()) { + if (context->supportsTextureStorage()) { glTexStorage2D(GL_TEXTURE_2D, 1, internalFormat, im.width(), im.height()); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, im.width(), im.height(), format, type, im.constBits());