diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index 5edaddcd6a..84a70f0e90 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -400,6 +400,9 @@ static bool isSizedTextureFormat(QOpenGLTexture::TextureFormat internalFormat) case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC: return true; + case QOpenGLTexture::RGB8_ETC1: + return false; + case QOpenGLTexture::DepthFormat: case QOpenGLTexture::AlphaFormat: @@ -662,6 +665,7 @@ static QOpenGLTexture::PixelFormat pixelFormatCompatibleWithInternalFormat(QOpen case QOpenGLTexture::SRGB_Alpha_DXT3: case QOpenGLTexture::SRGB_Alpha_DXT5: case QOpenGLTexture::SRGB_BP_UNorm: + case QOpenGLTexture::RGB8_ETC1: return QOpenGLTexture::RGBA; case QOpenGLTexture::R11_EAC_UNorm: @@ -839,6 +843,7 @@ static QOpenGLTexture::PixelType pixelTypeCompatibleWithInternalFormat(QOpenGLTe case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2: case QOpenGLTexture::RGBA8_ETC2_EAC: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC: + case QOpenGLTexture::RGB8_ETC1: return QOpenGLTexture::UInt8; case QOpenGLTexture::DepthFormat: @@ -1856,6 +1861,7 @@ QOpenGLTexture *QOpenGLTexturePrivate::createTextureView(QOpenGLTexture::Target \value SRGB8_PunchThrough_Alpha1_ETC2 Equivalent to GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 \value RGBA8_ETC2_EAC Equivalent to GL_COMPRESSED_RGBA8_ETC2_EAC \value SRGB8_Alpha8_ETC2_EAC Equivalent to GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC + \value RGB8_ETC1 Equivalent to GL_ETC1_RGB8_OES \value SRGB8 Equivalent to GL_SRGB8 \value SRGB8_Alpha8 Equivalent to GL_SRGB8_ALPHA8 @@ -2393,6 +2399,7 @@ void QOpenGLTexture::setFormat(TextureFormat format) case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2: case QOpenGLTexture::RGBA8_ETC2_EAC: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC: + case QOpenGLTexture::RGB8_ETC1: case RG3B2: case R5G6B5: case RGB5A1: diff --git a/src/gui/opengl/qopengltexture.h b/src/gui/opengl/qopengltexture.h index baab2d634f..ec52a192fa 100644 --- a/src/gui/opengl/qopengltexture.h +++ b/src/gui/opengl/qopengltexture.h @@ -196,6 +196,7 @@ public: SRGB8_PunchThrough_Alpha1_ETC2 = 0x9277, // GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 RGBA8_ETC2_EAC = 0x9278, // GL_COMPRESSED_RGBA8_ETC2_EAC SRGB8_Alpha8_ETC2_EAC = 0x9279, // GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC + RGB8_ETC1 = 0x8D64, // GL_ETC1_RGB8_OES // sRGB formats SRGB8 = 0x8C41, // GL_SRGB8