From bf5fd40d646e01d81096760ffaaea0dae4c20f31 Mon Sep 17 00:00:00 2001 From: mittorn Date: Wed, 25 Oct 2023 22:22:54 +0300 Subject: [PATCH] gl2shim: workaround empty rgb5/rgb8 textures --- ref/gl/gl2_shim/gl2_shim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ref/gl/gl2_shim/gl2_shim.c b/ref/gl/gl2_shim/gl2_shim.c index ecb0c4a2..904f0d8e 100644 --- a/ref/gl/gl2_shim/gl2_shim.c +++ b/ref/gl/gl2_shim/gl2_shim.c @@ -1014,7 +1014,7 @@ static void APIENTRY GL2_TexImage2D( GLenum target, GLint level, GLint internalf } internalformat = format; } - if( internalformat == GL_LUMINANCE8_ALPHA8 || internalformat == GL_RGB ) + if( internalformat == GL_LUMINANCE8_ALPHA8 || internalformat == GL_RGB || internalformat == GL_RGB8 || internalformat == GL_RGB5 ) internalformat = GL_RGBA; rpglTexImage2D( target, level, internalformat, width, height, border, format, type, data ); if( data != pixels )