2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 18:07:09 +01:00

gl2shim: workaround empty rgb5/rgb8 textures

This commit is contained in:
mittorn 2023-10-25 22:22:54 +03:00 committed by Alibek Omarov
parent 6bc613bdb4
commit bf5fd40d64

View File

@ -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 )