Package org.lwjgl.stb
Class STBDXT
- java.lang.Object
-
- org.lwjgl.stb.STBDXT
-
public class STBDXT extends java.lang.Object
Native bindings to stb_dxt.h from the stb library.DXT1/DXT5 compressor.
-
-
Field Summary
Fields 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
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static void
stb_compress_dxt_block(java.nio.ByteBuffer dest, java.nio.ByteBuffer src, boolean alpha, int mode)
Call this function for every block (you must pad).
-
-
-
Field Detail
-
STB_DXT_NORMAL
public static final int STB_DXT_NORMAL
- See Also:
- Constant Field Values
-
STB_DXT_DITHER
public static final int STB_DXT_DITHER
Use dithering. Dubious win, never use for normal maps and the like!- See Also:
- Constant Field Values
-
STB_DXT_HIGHQUAL
public static final int STB_DXT_HIGHQUAL
High quality mode, does two refinement steps instead of 1. ~30-40% slower.- See Also:
- Constant Field Values
-
-
Method Detail
-
stb_compress_dxt_block
public static void stb_compress_dxt_block(java.nio.ByteBuffer dest, java.nio.ByteBuffer src, boolean alpha, int mode)
Call this function for every block (you must pad). The source should be a 4x4 block of RGBA data in row-major order; A is ignored if you specifyalpha=0
; you can turn on dithering and "high quality" usingmode
.- Parameters:
dest
- a buffer in which to store the compressed blocksrc
- 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
-
-