ktxTexture_CompressAstc.
Passing a struct initialized to 0 will use blockDimension 4x4, mode LDR and qualityLevel FASTEST. Setting
qualityLevel to PACK_ASTC_QUALITY_LEVEL_MEDIUM is recommended.
struct ktxAstcParams {
ktx_uint32_t structSize;
ktx_bool_t verbose;
ktx_uint32_t threadCount;
ktx_uint32_t blockDimension;
ktx_uint32_t mode;
ktx_uint32_t qualityLevel;
ktx_bool_t normalMap;
ktx_bool_t perceptual;
char inputSwizzle[4];
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | ktxAstcParams.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | BLOCKDIMENSION
The struct member offsets. |
| public static final int | INPUTSWIZZLE
The struct member offsets. |
| public static final int | MODE
The struct member offsets. |
| public static final int | NORMALMAP
The struct member offsets. |
| public static final int | PERCEPTUAL
The struct member offsets. |
| public static final int | QUALITYLEVEL
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STRUCTSIZE
The struct member offsets. |
| public static final int | THREADCOUNT
The struct member offsets. |
| public static final int | VERBOSE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | ktxAstcParams(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public ktxAstcParams | |
| public static ktxAstcParams | |
| public static ktxAstcParams. | calloc(int
the buffer capacity capacity)Returns a new |
| public static ktxAstcParams | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static ktxAstcParams. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected ktxAstcParams | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static ktxAstcParams | |
| public static ktxAstcParams | |
| public static ktxAstcParams. | create(int
the buffer capacity capacity)Returns a new |
| public static ktxAstcParams. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static ktxAstcParams | |
| public static ktxAstcParams. | |
| public ByteBuffer | |
| public byte | |
| public ktxAstcParams | |
| public ktxAstcParams | inputSwizzle(int index, byte value)
Sets the specified value at the specified index of the |
| public static ktxAstcParams | |
| public static ktxAstcParams. | malloc(int
the buffer capacity capacity)Returns a new |
| public static ktxAstcParams | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static ktxAstcParams. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public int | |
| public ktxAstcParams | |
| public static int | |
| public static void | |
| public static ByteBuffer | |
| public static byte | |
| public static void | |
| public static void | |
| public static int | |
| public static void | |
| public static boolean | |
| public static void | |
| public boolean | |
| public ktxAstcParams | |
| public static boolean | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static boolean | |
| public static void | |
| public boolean | |
| public ktxAstcParams | |
| public int | |
| public ktxAstcParams | |
| public ktxAstcParams | set(int structSize, boolean verbose, int threadCount, int blockDimension, int mode, int qualityLevel, boolean normalMap, boolean perceptual, ByteBuffer inputSwizzle)
Initializes this struct with the specified values. |
| public ktxAstcParams | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public ktxAstcParams | |
| public int | |
| public ktxAstcParams | |
| public boolean | |
| public ktxAstcParams |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| BLOCKDIMENSION | back to summary |
|---|---|
| public static final int BLOCKDIMENSION The struct member offsets. | |
| INPUTSWIZZLE | back to summary |
|---|---|
| public static final int INPUTSWIZZLE The struct member offsets. | |
| MODE | back to summary |
|---|---|
| public static final int MODE The struct member offsets. | |
| NORMALMAP | back to summary |
|---|---|
| public static final int NORMALMAP The struct member offsets. | |
| PERCEPTUAL | back to summary |
|---|---|
| public static final int PERCEPTUAL The struct member offsets. | |
| QUALITYLEVEL | back to summary |
|---|---|
| public static final int QUALITYLEVEL The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| STRUCTSIZE | back to summary |
|---|---|
| public static final int STRUCTSIZE The struct member offsets. | |
| THREADCOUNT | back to summary |
|---|---|
| public static final int THREADCOUNT The struct member offsets. | |
| VERBOSE | back to summary |
|---|---|
| public static final int VERBOSE The struct member offsets. | |
| ktxAstcParams | back to summary |
|---|---|
| protected ktxAstcParams(long address, ByteBuffer container) | |
| ktxAstcParams | back to summary |
|---|---|
| public ktxAstcParams(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| blockDimension | back to summary |
|---|---|
| public int blockDimension() Combinations of block dimensions that astcenc supports
| |
| blockDimension | back to summary |
|---|---|
| public ktxAstcParams blockDimension(int value) Sets the specified value to the | |
| calloc | back to summary |
|---|---|
| public static ktxAstcParams calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static ktxAstcParams. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static ktxAstcParams calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static ktxAstcParams. Returns a new
| |
| create | back to summary |
|---|---|
| protected ktxAstcParams create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static ktxAstcParams create() Returns a new | |
| create | back to summary |
|---|---|
| public static ktxAstcParams create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static ktxAstcParams. Returns a new
| |
| create | back to summary |
|---|---|
| public static ktxAstcParams. Create a
| |
| createSafe | back to summary |
|---|---|
| public static ktxAstcParams createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static ktxAstcParams. Like
| |
| inputSwizzle | back to summary |
|---|---|
| public ByteBuffer inputSwizzle() A swizzle to provide as input to astcenc. It must match the regular expression
| |
| inputSwizzle | back to summary |
|---|---|
| public byte inputSwizzle(int index) A swizzle to provide as input to astcenc. It must match the regular expression
| |
| inputSwizzle | back to summary |
|---|---|
| public ktxAstcParams inputSwizzle(ByteBuffer value) Copies the specified | |
| inputSwizzle | back to summary |
|---|---|
| public ktxAstcParams inputSwizzle(int index, byte value) Sets the specified value at the specified index of the | |
| malloc | back to summary |
|---|---|
| public static ktxAstcParams malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static ktxAstcParams. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static ktxAstcParams malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static ktxAstcParams. Returns a new
| |
| mode | back to summary |
|---|---|
| public int mode() Can be {ldr/hdr} from astcenc
| |
| mode | back to summary |
|---|---|
| public ktxAstcParams mode(int value) Sets the specified value to the | |
| nblockDimension | back to summary |
|---|---|
| public static int nblockDimension(long struct) Unsafe version of | |
| nblockDimension | back to summary |
|---|---|
| public static void nblockDimension(long struct, int value) Unsafe version of | |
| ninputSwizzle | back to summary |
|---|---|
| public static ByteBuffer ninputSwizzle(long struct) Unsafe version of | |
| ninputSwizzle | back to summary |
|---|---|
| public static byte ninputSwizzle(long struct, int index) Unsafe version of | |
| ninputSwizzle | back to summary |
|---|---|
| public static void ninputSwizzle(long struct, ByteBuffer value) Unsafe version of | |
| ninputSwizzle | back to summary |
|---|---|
| public static void ninputSwizzle(long struct, int index, byte value) Unsafe version of | |
| nmode | back to summary |
|---|---|
| public static int nmode(long struct) Unsafe version of | |
| nmode | back to summary |
|---|---|
| public static void nmode(long struct, int value) Unsafe version of | |
| nnormalMap | back to summary |
|---|---|
| public static boolean nnormalMap(long struct) Unsafe version of | |
| nnormalMap | back to summary |
|---|---|
| public static void nnormalMap(long struct, boolean value) Unsafe version of | |
| normalMap | back to summary |
|---|---|
| public boolean normalMap() Tunes codec parameters for better quality on normal maps. In this mode normals are compressed to X,Y components, Discarding Z component, reader will need to generate Z component in shaders.
| |
| normalMap | back to summary |
|---|---|
| public ktxAstcParams normalMap(boolean value) Sets the specified value to the | |
| nperceptual | back to summary |
|---|---|
| public static boolean nperceptual(long struct) Unsafe version of | |
| nperceptual | back to summary |
|---|---|
| public static void nperceptual(long struct, boolean value) Unsafe version of | |
| nqualityLevel | back to summary |
|---|---|
| public static int nqualityLevel(long struct) Unsafe version of | |
| nqualityLevel | back to summary |
|---|---|
| public static void nqualityLevel(long struct, int value) Unsafe version of | |
| nstructSize | back to summary |
|---|---|
| public static int nstructSize(long struct) Unsafe version of | |
| nstructSize | back to summary |
|---|---|
| public static void nstructSize(long struct, int value) Unsafe version of | |
| nthreadCount | back to summary |
|---|---|
| public static int nthreadCount(long struct) Unsafe version of | |
| nthreadCount | back to summary |
|---|---|
| public static void nthreadCount(long struct, int value) Unsafe version of | |
| nverbose | back to summary |
|---|---|
| public static boolean nverbose(long struct) Unsafe version of | |
| nverbose | back to summary |
|---|---|
| public static void nverbose(long struct, boolean value) Unsafe version of | |
| perceptual | back to summary |
|---|---|
| public boolean perceptual() The codec should optimize for perceptual error, instead of direct RMS error. This aims to improves perceived image quality, but typically lowers the measured PSNR score. Perceptual methods are currently only available for normal maps and RGB color data.
| |
| perceptual | back to summary |
|---|---|
| public ktxAstcParams perceptual(boolean value) Sets the specified value to the | |
| qualityLevel | back to summary |
|---|---|
| public int qualityLevel() astcenc supports -fastest, -fast, -medium, -thorough, -exhaustive
| |
| qualityLevel | back to summary |
|---|---|
| public ktxAstcParams qualityLevel(int value) Sets the specified value to the | |
| set | back to summary |
|---|---|
| public ktxAstcParams set(int structSize, boolean verbose, int threadCount, int blockDimension, int mode, int qualityLevel, boolean normalMap, boolean perceptual, ByteBuffer inputSwizzle) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public ktxAstcParams set(ktxAstcParams src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| structSize | back to summary |
|---|---|
| public int structSize() Size of this struct. Used so library can tell which version of struct is being passed.
| |
| structSize | back to summary |
|---|---|
| public ktxAstcParams structSize(int value) Sets the specified value to the | |
| threadCount | back to summary |
|---|---|
| public int threadCount() Number of threads used for compression. Default is 1.
| |
| threadCount | back to summary |
|---|---|
| public ktxAstcParams threadCount(int value) Sets the specified value to the | |
| verbose | back to summary |
|---|---|
| public boolean verbose() If true, prints Astc encoder operation details to Not recommended for GUI apps.
| |
| verbose | back to summary |
|---|---|
| public ktxAstcParams verbose(boolean value) Sets the specified value to the | |
ktxAstcParams structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final ktxAstcParams |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public ktxAstcParams. | |
| protected ktxAstcParams | |
| public ByteBuffer | |
| public byte | Returns: the value at the specified index of thektxAstcParams#inputSwizzle field.
|
| public ktxAstcParams. | inputSwizzle(ByteBuffer value)
Copies the specified |
| public ktxAstcParams. | inputSwizzle(int index, byte value)
Sets the specified value at the specified index of the |
| public int | |
| public ktxAstcParams. | |
| public boolean | |
| public ktxAstcParams. | |
| public boolean | |
| public ktxAstcParams. | |
| public int | |
| public ktxAstcParams. | |
| protected ktxAstcParams. | |
| public int | |
| public ktxAstcParams. | |
| public int | |
| public ktxAstcParams. | |
| public boolean | |
| public ktxAstcParams. |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final ktxAstcParams ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| blockDimension | back to summary |
|---|---|
public int blockDimension()
| |
| blockDimension | back to summary |
|---|---|
| public ktxAstcParams. Sets the specified value to the | |
| getElementFactory | back to summary |
|---|---|
| protected ktxAstcParams getElementFactory() Implements abstract org.
| |
| inputSwizzle | back to summary |
|---|---|
public ByteBuffer inputSwizzle()
| |
| inputSwizzle | back to summary |
|---|---|
public byte inputSwizzle(int index)
| |
| inputSwizzle | back to summary |
|---|---|
| public ktxAstcParams. Copies the specified | |
| inputSwizzle | back to summary |
|---|---|
| public ktxAstcParams. Sets the specified value at the specified index of the | |
| mode | back to summary |
|---|---|
public int mode()
| |
| mode | back to summary |
|---|---|
| public ktxAstcParams. Sets the specified value to the | |
| normalMap | back to summary |
|---|---|
public boolean normalMap()
| |
| normalMap | back to summary |
|---|---|
| public ktxAstcParams. Sets the specified value to the | |
| perceptual | back to summary |
|---|---|
public boolean perceptual()
| |
| perceptual | back to summary |
|---|---|
| public ktxAstcParams. Sets the specified value to the | |
| qualityLevel | back to summary |
|---|---|
public int qualityLevel()
| |
| qualityLevel | back to summary |
|---|---|
| public ktxAstcParams. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected ktxAstcParams. Implements abstract org.
| |
| structSize | back to summary |
|---|---|
public int structSize()
| |
| structSize | back to summary |
|---|---|
| public ktxAstcParams. Sets the specified value to the | |
| threadCount | back to summary |
|---|---|
public int threadCount()
| |
| threadCount | back to summary |
|---|---|
| public ktxAstcParams. Sets the specified value to the | |
| verbose | back to summary |
|---|---|
public boolean verbose()
| |
| verbose | back to summary |
|---|---|
| public ktxAstcParams. Sets the specified value to the | |