ref: fix processing indexed textures

This commit is contained in:
Alibek Omarov 2022-06-29 18:05:51 +03:00
parent 854bfb8673
commit 3fe392b41f
2 changed files with 10 additions and 0 deletions

View File

@ -1908,6 +1908,11 @@ void GL_ProcessTexture( int texnum, float gamma, int topColor, int bottomColor )
// all the operations makes over the image copy not an original
pic = gEngfuncs.FS_CopyImage( image->original );
// we need to expand image into RGBA buffer
if( pic->type == PF_INDEXED_24 || pic->type == PF_INDEXED_32 )
flags |= IMAGE_FORCE_RGBA;
gEngfuncs.Image_Process( &pic, topColor, bottomColor, flags, 0.0f );
GL_UploadTexture( image, pic );

View File

@ -1186,6 +1186,11 @@ void GAME_EXPORT GL_ProcessTexture( int texnum, float gamma, int topColor, int b
// all the operations makes over the image copy not an original
pic = gEngfuncs.FS_CopyImage( image->original );
// we need to expand image into RGBA buffer
if( pic->type == PF_INDEXED_24 || pic->type == PF_INDEXED_32 )
flags |= IMAGE_FORCE_RGBA;
gEngfuncs.Image_Process( &pic, topColor, bottomColor, flags, 0.0f );
GL_UploadTexture( image, pic );