Class ktxAstcParams

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ktxAstcParams extends Struct<ktxAstcParams> implements NativeResource

 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];
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • STRUCTSIZE

      public static final int STRUCTSIZE
      The struct member offsets.
    • VERBOSE

      public static final int VERBOSE
      The struct member offsets.
    • THREADCOUNT

      public static final int THREADCOUNT
      The struct member offsets.
    • BLOCKDIMENSION

      public static final int BLOCKDIMENSION
      The struct member offsets.
    • MODE

      public static final int MODE
      The struct member offsets.
    • QUALITYLEVEL

      public static final int QUALITYLEVEL
      The struct member offsets.
    • NORMALMAP

      public static final int NORMALMAP
      The struct member offsets.
    • PERCEPTUAL

      public static final int PERCEPTUAL
      The struct member offsets.
    • INPUTSWIZZLE

      public static final int INPUTSWIZZLE
      The struct member offsets.
  • Constructor Details

    • ktxAstcParams

      public ktxAstcParams(ByteBuffer container)
      Creates a ktxAstcParams instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<ktxAstcParams>
    • structSize

      public int structSize()
      Returns:
      the value of the structSize field.
    • verbose

      public boolean verbose()
      Returns:
      the value of the verbose field.
    • threadCount

      public int threadCount()
      Returns:
      the value of the threadCount field.
    • blockDimension

      public int blockDimension()
      Returns:
      the value of the blockDimension field.
    • mode

      public int mode()
      Returns:
      the value of the mode field.
    • qualityLevel

      public int qualityLevel()
      Returns:
      the value of the qualityLevel field.
    • normalMap

      public boolean normalMap()
      Returns:
      the value of the normalMap field.
    • perceptual

      public boolean perceptual()
      Returns:
      the value of the perceptual field.
    • inputSwizzle

      public ByteBuffer inputSwizzle()
      Returns:
      a ByteBuffer view of the inputSwizzle field.
    • inputSwizzle

      public byte inputSwizzle(int index)
      Returns:
      the value at the specified index of the inputSwizzle field.
    • structSize

      public ktxAstcParams structSize(int value)
      Sets the specified value to the structSize field.
    • verbose

      public ktxAstcParams verbose(boolean value)
      Sets the specified value to the verbose field.
    • threadCount

      public ktxAstcParams threadCount(int value)
      Sets the specified value to the threadCount field.
    • blockDimension

      public ktxAstcParams blockDimension(int value)
      Sets the specified value to the blockDimension field.
    • mode

      public ktxAstcParams mode(int value)
      Sets the specified value to the mode field.
    • qualityLevel

      public ktxAstcParams qualityLevel(int value)
      Sets the specified value to the qualityLevel field.
    • normalMap

      public ktxAstcParams normalMap(boolean value)
      Sets the specified value to the normalMap field.
    • perceptual

      public ktxAstcParams perceptual(boolean value)
      Sets the specified value to the perceptual field.
    • inputSwizzle

      public ktxAstcParams inputSwizzle(ByteBuffer value)
      Copies the specified ByteBuffer to the inputSwizzle field.
    • inputSwizzle

      public ktxAstcParams inputSwizzle(int index, byte value)
      Sets the specified value at the specified index of the inputSwizzle field.
    • set

      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

      public ktxAstcParams set(ktxAstcParams src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static ktxAstcParams malloc()
      Returns a new ktxAstcParams instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static ktxAstcParams calloc()
      Returns a new ktxAstcParams instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static ktxAstcParams create()
      Returns a new ktxAstcParams instance allocated with BufferUtils.
    • create

      public static ktxAstcParams create(long address)
      Returns a new ktxAstcParams instance for the specified memory address.
    • createSafe

      public static @Nullable ktxAstcParams createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static ktxAstcParams.Buffer malloc(int capacity)
      Returns a new ktxAstcParams.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static ktxAstcParams.Buffer calloc(int capacity)
      Returns a new ktxAstcParams.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static ktxAstcParams.Buffer create(int capacity)
      Returns a new ktxAstcParams.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static ktxAstcParams.Buffer create(long address, int capacity)
      Create a ktxAstcParams.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable ktxAstcParams.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static ktxAstcParams malloc(MemoryStack stack)
      Returns a new ktxAstcParams instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static ktxAstcParams calloc(MemoryStack stack)
      Returns a new ktxAstcParams instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static ktxAstcParams.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new ktxAstcParams.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static ktxAstcParams.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new ktxAstcParams.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nstructSize

      public static int nstructSize(long struct)
      Unsafe version of structSize().
    • nverbose

      public static boolean nverbose(long struct)
      Unsafe version of verbose().
    • nthreadCount

      public static int nthreadCount(long struct)
      Unsafe version of threadCount().
    • nblockDimension

      public static int nblockDimension(long struct)
      Unsafe version of blockDimension().
    • nmode

      public static int nmode(long struct)
      Unsafe version of mode().
    • nqualityLevel

      public static int nqualityLevel(long struct)
      Unsafe version of qualityLevel().
    • nnormalMap

      public static boolean nnormalMap(long struct)
      Unsafe version of normalMap().
    • nperceptual

      public static boolean nperceptual(long struct)
      Unsafe version of perceptual().
    • ninputSwizzle

      public static ByteBuffer ninputSwizzle(long struct)
      Unsafe version of inputSwizzle().
    • ninputSwizzle

      public static byte ninputSwizzle(long struct, int index)
      Unsafe version of inputSwizzle.
    • nstructSize

      public static void nstructSize(long struct, int value)
      Unsafe version of structSize.
    • nverbose

      public static void nverbose(long struct, boolean value)
      Unsafe version of verbose.
    • nthreadCount

      public static void nthreadCount(long struct, int value)
      Unsafe version of threadCount.
    • nblockDimension

      public static void nblockDimension(long struct, int value)
      Unsafe version of blockDimension.
    • nmode

      public static void nmode(long struct, int value)
      Unsafe version of mode.
    • nqualityLevel

      public static void nqualityLevel(long struct, int value)
      Unsafe version of qualityLevel.
    • nnormalMap

      public static void nnormalMap(long struct, boolean value)
      Unsafe version of normalMap.
    • nperceptual

      public static void nperceptual(long struct, boolean value)
      Unsafe version of perceptual.
    • ninputSwizzle

      public static void ninputSwizzle(long struct, ByteBuffer value)
      Unsafe version of inputSwizzle.
    • ninputSwizzle

      public static void ninputSwizzle(long struct, int index, byte value)
      Unsafe version of inputSwizzle.