From 60e3964322006e92dd0f150a877449f2416c2fb6 Mon Sep 17 00:00:00 2001 From: Gabriel Souza Franco Date: Mon, 19 Aug 2024 23:39:58 -0300 Subject: [PATCH] opengl/gltexture: Fix format for 565 textures > GL_INVALID_OPERATION is generated if type is one of [...] > GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, [...] > and format is not GL_RGB. --- 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 3ab052fc34..02c5732056 100644 --- a/src/opengl/gltexture.cpp +++ b/src/opengl/gltexture.cpp @@ -42,7 +42,7 @@ struct {GL_RGB8, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV}, // QImage::Format_RGB32 {0, 0, 0}, // QImage::Format_ARGB32 {GL_RGBA8, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV}, // QImage::Format_ARGB32_Premultiplied - {GL_RGB8, GL_BGR, GL_UNSIGNED_SHORT_5_6_5_REV}, // QImage::Format_RGB16 + {GL_RGB8, GL_RGB, GL_UNSIGNED_SHORT_5_6_5}, // QImage::Format_RGB16 {0, 0, 0}, // QImage::Format_ARGB8565_Premultiplied {0, 0, 0}, // QImage::Format_RGB666 {0, 0, 0}, // QImage::Format_ARGB6666_Premultiplied