Browse Source

ref: fix processing indexed textures

pull/911/head
Alibek Omarov 1 month ago
parent
commit
3fe392b41f
  1. 5
      ref_gl/gl_image.c
  2. 5
      ref_soft/r_image.c

5
ref_gl/gl_image.c

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

5
ref_soft/r_image.c

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

Loading…
Cancel
Save