mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-22 04:44:17 +00:00
ref: fix processing indexed textures
This commit is contained in:
parent
854bfb8673
commit
3fe392b41f
@ -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 );
|
||||
|
@ -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…
x
Reference in New Issue
Block a user