From cd93a5de110c2045278606cee37829304ed36689 Mon Sep 17 00:00:00 2001 From: snake5 Date: Sat, 26 Nov 2016 16:45:40 +0200 Subject: [PATCH] added basic 3Dc support --- stb_dxt.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stb_dxt.h b/stb_dxt.h index 0a8b34a..31b36d4 100644 --- a/stb_dxt.h +++ b/stb_dxt.h @@ -32,6 +32,7 @@ #define STB_DXT_HIGHQUAL 2 // high quality mode, does two refinement steps instead of 1. ~30-40% slower. void stb_compress_dxt_block(unsigned char *dest, const unsigned char *src, int alpha, int mode); +void stb_compress_3dc_block_rgxx8(unsigned char *dest, const unsigned char *src, int mode); #define STB_COMPRESS_DXT_BLOCK #ifdef STB_DXT_IMPLEMENTATION @@ -625,6 +626,12 @@ void stb_compress_dxt_block(unsigned char *dest, const unsigned char *src, int a stb__CompressColorBlock(dest,(unsigned char*) src,mode); } + +void stb_compress_3dc_block_rgxx8(unsigned char *dest, const unsigned char *src, int mode) +{ + stb__CompressAlphaBlock(dest,(unsigned char*) src - 3,mode); + stb__CompressAlphaBlock(dest + 8,(unsigned char*) src - 2,mode); +} #endif // STB_DXT_IMPLEMENTATION #endif // STB_INCLUDE_STB_DXT_H