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.
This commit is contained in:
Vlad Zahorodnii 2024-08-19 12:36:14 +03:00
parent 3e3bbd3034
commit 8ca94eed44

View file

@ -571,7 +571,7 @@ std::unique_ptr<GLTexture> GLTexture::upload(const QImage &image)
type = GL_UNSIGNED_INT_8_8_8_8_REV; 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()); glTexStorage2D(GL_TEXTURE_2D, 1, internalFormat, im.width(), im.height());
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, im.width(), im.height(), glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, im.width(), im.height(),
format, type, im.constBits()); format, type, im.constBits());