Explorar o código

Add STB_DXT_STATIC option.

Kevin Schmidt %!s(int64=8) %!d(string=hai) anos
pai
achega
dda7d72841
Modificáronse 1 ficheiros con 8 adicións e 2 borrados
  1. 8 2
      stb_dxt.h

+ 8 - 2
stb_dxt.h

@@ -35,8 +35,14 @@
 extern "C" {
 extern "C" {
 #endif
 #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_bc5_block(unsigned char *dest, const unsigned char *src_rg_two_byte_per_pixel);
+#ifdef STB_DXT_STATIC
+#define STBDDEF static
+#else
+#define STBDDEF extern
+#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_bc5_block(unsigned char *dest, const unsigned char *src_rg_two_byte_per_pixel);
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }