浏览代码

Merge branch 'ppiastucki-bc4' into dev

Fabian Giesen 8 年之前
父节点
当前提交
31f8c2109b
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      stb_dxt.h

+ 6 - 0
stb_dxt.h

@@ -45,6 +45,7 @@ extern "C" {
 #endif
 
 STBDDEF void stb_compress_dxt_block(unsigned char *dest, const unsigned char *src_rgba_four_bytes_per_pixel, int alpha, int mode);
+STBDDEF void stb_compress_bc4_block(unsigned char *dest, const unsigned char *src_r_one_byte_per_pixel);
 STBDDEF void stb_compress_bc5_block(unsigned char *dest, const unsigned char *src_rg_two_byte_per_pixel);
 
 #ifdef __cplusplus
@@ -660,6 +661,11 @@ void stb_compress_dxt_block(unsigned char *dest, const unsigned char *src, int a
    stb__CompressColorBlock(dest,(unsigned char*) src,mode);
 }
 
+void stb_compress_bc4_block(unsigned char *dest, const unsigned char *src)
+{
+   stb__CompressAlphaBlock(dest,(unsigned char*) src, 1);
+}
+
 void stb_compress_bc5_block(unsigned char *dest, const unsigned char *src)
 {
    stb__CompressAlphaBlock(dest,(unsigned char*) src,2);