From 8a55e1e5a54794b42f0398e37d9057eaed738831 Mon Sep 17 00:00:00 2001
From: ppiastucki <piotr@jtilia.org>
Date: Wed, 26 Apr 2017 22:32:37 +0200
Subject: [PATCH] Add support for BC4

---
 stb_dxt.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/stb_dxt.h b/stb_dxt.h
index 5399799..ee0decb 100644
--- a/stb_dxt.h
+++ b/stb_dxt.h
@@ -36,6 +36,7 @@ extern "C" {
 #endif
 
 void stb_compress_dxt_block(unsigned char *dest, const unsigned char *src_rgba_four_bytes_per_pixel, int alpha, int mode);
+void stb_compress_bc4_block(unsigned char *dest, const unsigned char *src_r_one_byte_per_pixel);
 void stb_compress_bc5_block(unsigned char *dest, const unsigned char *src_rg_two_byte_per_pixel);
 
 #ifdef __cplusplus
@@ -636,6 +637,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);