Skip to content
Myr

stb_dxt: extern "C"

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parent 4ce23da · Browse files · 1 file+10 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−1 removed

  • other:+10 added−1 removed

1 file+10 added−1 removed

modified:stb_dxt.h+10 added-1 removed
7 unmodified lines
8// A is ignored if you specify alpha=0; you can turn on dithering9// and "high quality" using mode.10//11// version history:12// v1.05 - (stb) support bc5/3dc (Arvids Kokins)12// v1.05 - (stb) support bc5/3dc (Arvids Kokins), use extern "C" in C++ (Pavel Krajcevski)13// v1.04 - (ryg) default to no rounding bias for lerped colors (as per S3TC/DX10 spec);14// single color match fix (allow for inexact color interpolation);15// optimal DXT5 index finder; "high quality" mode that runs multiple refinement steps.16// v1.03 - (stb) endianness support
12 unmodified lines
29#define STB_DXT_NORMAL 030#define STB_DXT_DITHER 1 // use dithering. dubious win. never use for normal maps and the like!31#define STB_DXT_HIGHQUAL 2 // high quality mode, does two refinement steps instead of 1. ~30-40% slower.3233#ifdef __cplusplus34extern "C" {35#endif3637void stb_compress_dxt_block(unsigned char *dest, const unsigned char *src_rgba_four_bytes_per_pixel, int alpha, int mode);38void stb_compress_bc5_block(unsigned char *dest, const unsigned char *src_rg_two_byte_per_pixel, int mode);3940#ifdef __cplusplus41}42#endif4344#define STB_COMPRESS_DXT_BLOCK4546#ifdef STB_DXT_IMPLEMENTATION47
639 unmodified lines