public class STBDXT
extends java.lang.Object
DXT1/DXT5 compressor.
| Modifier and Type | Field and Description |
|---|---|
static int |
STB_DXT_DITHER
Use dithering.
|
static int |
STB_DXT_HIGHQUAL
High quality mode, does two refinement steps instead of 1.
|
static int |
STB_DXT_NORMAL |
| Modifier and Type | Method and Description |
|---|---|
static void |
nstb_compress_bc4_block(long dest,
long src_r_one_byte_per_pixel)
Unsafe version of:
compress_bc4_block |
static void |
nstb_compress_bc5_block(long dest,
long src_rg_two_byte_per_pixel)
Unsafe version of:
compress_bc5_block |
static void |
nstb_compress_dxt_block(long dest,
long src_rgba_four_bytes_per_pixel,
int alpha,
int mode)
Unsafe version of:
compress_dxt_block |
static void |
stb_compress_bc4_block(java.nio.ByteBuffer dest,
java.nio.ByteBuffer src_r_one_byte_per_pixel)
Call this function for every block (you must pad).
|
static void |
stb_compress_bc5_block(java.nio.ByteBuffer dest,
java.nio.ByteBuffer src_rg_two_byte_per_pixel)
Call this function for every block (you must pad).
|
static void |
stb_compress_dxt_block(java.nio.ByteBuffer dest,
java.nio.ByteBuffer src_rgba_four_bytes_per_pixel,
boolean alpha,
int mode)
Call this function for every block (you must pad).
|
public static final int STB_DXT_NORMAL
public static final int STB_DXT_DITHER
public static final int STB_DXT_HIGHQUAL
public static void nstb_compress_dxt_block(long dest,
long src_rgba_four_bytes_per_pixel,
int alpha,
int mode)
compress_dxt_blockpublic static void stb_compress_dxt_block(java.nio.ByteBuffer dest,
java.nio.ByteBuffer src_rgba_four_bytes_per_pixel,
boolean alpha,
int mode)
alpha=0; you can turn on dithering and "high quality" using mode.dest - a buffer in which to store the compressed blocksrc_rgba_four_bytes_per_pixel - the block to compressalpha - 1 to compress the alpha channel, 0 to ignore itmode - the compression mode. One of:DXT_NORMAL | DXT_DITHER | DXT_HIGHQUAL |
public static void nstb_compress_bc4_block(long dest,
long src_r_one_byte_per_pixel)
compress_bc4_blockpublic static void stb_compress_bc4_block(java.nio.ByteBuffer dest,
java.nio.ByteBuffer src_r_one_byte_per_pixel)
dest - a buffer in which to store the compressed blocksrc_r_one_byte_per_pixel - the block to compresspublic static void nstb_compress_bc5_block(long dest,
long src_rg_two_byte_per_pixel)
compress_bc5_blockpublic static void stb_compress_bc5_block(java.nio.ByteBuffer dest,
java.nio.ByteBuffer src_rg_two_byte_per_pixel)
dest - a buffer in which to store the compressed blocksrc_rg_two_byte_per_pixel - the block to compressCopyright LWJGL. All Rights Reserved. License terms.