summaryrefslogtreecommitdiff
path: root/externals/stb/stb_dxt.h
diff options
context:
space:
mode:
Diffstat (limited to 'externals/stb/stb_dxt.h')
-rw-r--r--externals/stb/stb_dxt.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/externals/stb/stb_dxt.h b/externals/stb/stb_dxt.h
new file mode 100644
index 000000000..07d1d1de4
--- /dev/null
+++ b/externals/stb/stb_dxt.h
@@ -0,0 +1,36 @@
1// SPDX-FileCopyrightText: fabian "ryg" giesen
2// SPDX-License-Identifier: MIT
3
4// stb_dxt.h - v1.12 - DXT1/DXT5 compressor
5
6#ifndef STB_INCLUDE_STB_DXT_H
7#define STB_INCLUDE_STB_DXT_H
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#ifdef STB_DXT_STATIC
14#define STBDDEF static
15#else
16#define STBDDEF extern
17#endif
18
19// compression mode (bitflags)
20#define STB_DXT_NORMAL 0
21#define STB_DXT_DITHER 1 // use dithering. was always dubious, now deprecated. does nothing!
22#define STB_DXT_HIGHQUAL \
23 2 // high quality mode, does two refinement steps instead of 1. ~30-40% slower.
24
25STBDDEF void stb_compress_bc1_block(unsigned char* dest,
26 const unsigned char* src_rgba_four_bytes_per_pixel, int alpha,
27 int mode);
28
29STBDDEF void stb_compress_bc3_block(unsigned char* dest, const unsigned char* src, int mode);
30
31#define STB_COMPRESS_DXT_BLOCK
32
33#ifdef __cplusplus
34}
35#endif
36#endif // STB_INCLUDE_STB_DXT_H