engine: common: imagelib: refactoring

This commit is contained in:
Alibek Omarov
2025-12-13 23:11:48 +05:00
parent e2835a7614
commit 16c849d085
3 changed files with 36 additions and 70 deletions

View File

@@ -8,22 +8,9 @@ typically expanded to rgba buffer
NOTE: number at end of pixelformat name it's a total bitscount e.g. PF_RGB_24 == PF_RGB_888
========================================================================
*/
#define ImageRAW( type ) (type == PF_RGBA_32 || type == PF_BGRA_32 || type == PF_RGB_24 || type == PF_BGR_24 || type == PF_LUMINANCE)
#define ImageCompressed( type ) \
( type == PF_DXT1 \
|| type == PF_DXT3 \
|| type == PF_DXT5 \
|| type == PF_ATI2 \
|| type == PF_BC4_SIGNED \
|| type == PF_BC4_UNSIGNED \
|| type == PF_BC5_SIGNED \
|| type == PF_BC5_UNSIGNED \
|| type == PF_BC6H_SIGNED \
|| type == PF_BC6H_UNSIGNED \
|| type == PF_BC7_UNORM \
|| type == PF_BC7_SRGB \
|| type == PF_KTX2_RAW )
#define ImageBigEndian( type ) ( type == PF_BGRA_32 || type == PF_BGR_24 )
#define ImageRAW( type ) ( type >= PF_RGBA_32 && type <= PF_LUMINANCE )
#define ImageCompressed( type ) ( type >= PF_DXT1 && type <= PF_KTX2_RAW )
#define ImageBigEndian( type ) ( type == PF_BGRA_32 || type == PF_BGR_24 )
typedef enum
{