Class ktxBasisParams

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ktxBasisParams extends Struct<ktxBasisParams> implements NativeResource

 struct ktxBasisParams {
     ktx_uint32_t structSize;
     ktx_bool_t uastc;
     ktx_bool_t verbose;
     ktx_bool_t noSSE;
     ktx_uint32_t threadCount;
     ktx_uint32_t compressionLevel;
     ktx_uint32_t qualityLevel;
     ktx_uint32_t maxEndpoints;
     float endpointRDOThreshold;
     ktx_uint32_t maxSelectors;
     float selectorRDOThreshold;
     char inputSwizzle[4];
     ktx_bool_t normalMap;
     ktx_bool_t separateRGToRGB_A;
     ktx_bool_t preSwizzle;
     ktx_bool_t noEndpointRDO;
     ktx_bool_t noSelectorRDO;
     ktx_pack_uastc_flags uastcFlags;
     ktx_bool_t uastcRDO;
     float uastcRDOQualityScalar;
     ktx_uint32_t uastcRDODictSize;
     float uastcRDOMaxSmoothBlockErrorScale;
     float uastcRDOMaxSmoothBlockStdDev;
     ktx_bool_t uastcRDODontFavorSimplerModes;
     ktx_bool_t uastcRDONoMultithreading;
 }
  • 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.
    • UASTC

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

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

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

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

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

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

      public static final int MAXENDPOINTS
      The struct member offsets.
    • ENDPOINTRDOTHRESHOLD

      public static final int ENDPOINTRDOTHRESHOLD
      The struct member offsets.
    • MAXSELECTORS

      public static final int MAXSELECTORS
      The struct member offsets.
    • SELECTORRDOTHRESHOLD

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

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

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

      public static final int SEPARATERGTORGB_A
      The struct member offsets.
    • PRESWIZZLE

      public static final int PRESWIZZLE
      The struct member offsets.
    • NOENDPOINTRDO

      public static final int NOENDPOINTRDO
      The struct member offsets.
    • NOSELECTORRDO

      public static final int NOSELECTORRDO
      The struct member offsets.
    • UASTCFLAGS

      public static final int UASTCFLAGS
      The struct member offsets.
    • UASTCRDO

      public static final int UASTCRDO
      The struct member offsets.
    • UASTCRDOQUALITYSCALAR

      public static final int UASTCRDOQUALITYSCALAR
      The struct member offsets.
    • UASTCRDODICTSIZE

      public static final int UASTCRDODICTSIZE
      The struct member offsets.
    • UASTCRDOMAXSMOOTHBLOCKERRORSCALE

      public static final int UASTCRDOMAXSMOOTHBLOCKERRORSCALE
      The struct member offsets.
    • UASTCRDOMAXSMOOTHBLOCKSTDDEV

      public static final int UASTCRDOMAXSMOOTHBLOCKSTDDEV
      The struct member offsets.
    • UASTCRDODONTFAVORSIMPLERMODES

      public static final int UASTCRDODONTFAVORSIMPLERMODES
      The struct member offsets.
    • UASTCRDONOMULTITHREADING

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

    • ktxBasisParams

      public ktxBasisParams(ByteBuffer container)
      Creates a ktxBasisParams 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<ktxBasisParams>
    • structSize

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

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

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

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

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

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

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

      public int maxEndpoints()
      Returns:
      the value of the maxEndpoints field.
    • endpointRDOThreshold

      public float endpointRDOThreshold()
      Returns:
      the value of the endpointRDOThreshold field.
    • maxSelectors

      public int maxSelectors()
      Returns:
      the value of the maxSelectors field.
    • selectorRDOThreshold

      public float selectorRDOThreshold()
      Returns:
      the value of the selectorRDOThreshold 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.
    • normalMap

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

      public boolean separateRGToRGB_A()
      Returns:
      the value of the separateRGToRGB_A field.
    • preSwizzle

      public boolean preSwizzle()
      Returns:
      the value of the preSwizzle field.
    • noEndpointRDO

      public boolean noEndpointRDO()
      Returns:
      the value of the noEndpointRDO field.
    • noSelectorRDO

      public boolean noSelectorRDO()
      Returns:
      the value of the noSelectorRDO field.
    • uastcFlags

      public int uastcFlags()
      Returns:
      the value of the uastcFlags field.
    • uastcRDO

      public boolean uastcRDO()
      Returns:
      the value of the uastcRDO field.
    • uastcRDOQualityScalar

      public float uastcRDOQualityScalar()
      Returns:
      the value of the uastcRDOQualityScalar field.
    • uastcRDODictSize

      public int uastcRDODictSize()
      Returns:
      the value of the uastcRDODictSize field.
    • uastcRDOMaxSmoothBlockErrorScale

      public float uastcRDOMaxSmoothBlockErrorScale()
      Returns:
      the value of the uastcRDOMaxSmoothBlockErrorScale field.
    • uastcRDOMaxSmoothBlockStdDev

      public float uastcRDOMaxSmoothBlockStdDev()
      Returns:
      the value of the uastcRDOMaxSmoothBlockStdDev field.
    • uastcRDODontFavorSimplerModes

      public boolean uastcRDODontFavorSimplerModes()
      Returns:
      the value of the uastcRDODontFavorSimplerModes field.
    • uastcRDONoMultithreading

      public boolean uastcRDONoMultithreading()
      Returns:
      the value of the uastcRDONoMultithreading field.
    • structSize

      public ktxBasisParams structSize(int value)
      Sets the specified value to the structSize field.
    • uastc

      public ktxBasisParams uastc(boolean value)
      Sets the specified value to the uastc field.
    • verbose

      public ktxBasisParams verbose(boolean value)
      Sets the specified value to the verbose field.
    • noSSE

      public ktxBasisParams noSSE(boolean value)
      Sets the specified value to the noSSE field.
    • threadCount

      public ktxBasisParams threadCount(int value)
      Sets the specified value to the threadCount field.
    • compressionLevel

      public ktxBasisParams compressionLevel(int value)
      Sets the specified value to the compressionLevel field.
    • qualityLevel

      public ktxBasisParams qualityLevel(int value)
      Sets the specified value to the qualityLevel field.
    • maxEndpoints

      public ktxBasisParams maxEndpoints(int value)
      Sets the specified value to the maxEndpoints field.
    • endpointRDOThreshold

      public ktxBasisParams endpointRDOThreshold(float value)
      Sets the specified value to the endpointRDOThreshold field.
    • maxSelectors

      public ktxBasisParams maxSelectors(int value)
      Sets the specified value to the maxSelectors field.
    • selectorRDOThreshold

      public ktxBasisParams selectorRDOThreshold(float value)
      Sets the specified value to the selectorRDOThreshold field.
    • inputSwizzle

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

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

      public ktxBasisParams normalMap(boolean value)
      Sets the specified value to the normalMap field.
    • separateRGToRGB_A

      public ktxBasisParams separateRGToRGB_A(boolean value)
      Sets the specified value to the separateRGToRGB_A field.
    • preSwizzle

      public ktxBasisParams preSwizzle(boolean value)
      Sets the specified value to the preSwizzle field.
    • noEndpointRDO

      public ktxBasisParams noEndpointRDO(boolean value)
      Sets the specified value to the noEndpointRDO field.
    • noSelectorRDO

      public ktxBasisParams noSelectorRDO(boolean value)
      Sets the specified value to the noSelectorRDO field.
    • uastcFlags

      public ktxBasisParams uastcFlags(int value)
      Sets the specified value to the uastcFlags field.
    • uastcRDO

      public ktxBasisParams uastcRDO(boolean value)
      Sets the specified value to the uastcRDO field.
    • uastcRDOQualityScalar

      public ktxBasisParams uastcRDOQualityScalar(float value)
      Sets the specified value to the uastcRDOQualityScalar field.
    • uastcRDODictSize

      public ktxBasisParams uastcRDODictSize(int value)
      Sets the specified value to the uastcRDODictSize field.
    • uastcRDOMaxSmoothBlockErrorScale

      public ktxBasisParams uastcRDOMaxSmoothBlockErrorScale(float value)
      Sets the specified value to the uastcRDOMaxSmoothBlockErrorScale field.
    • uastcRDOMaxSmoothBlockStdDev

      public ktxBasisParams uastcRDOMaxSmoothBlockStdDev(float value)
      Sets the specified value to the uastcRDOMaxSmoothBlockStdDev field.
    • uastcRDODontFavorSimplerModes

      public ktxBasisParams uastcRDODontFavorSimplerModes(boolean value)
      Sets the specified value to the uastcRDODontFavorSimplerModes field.
    • uastcRDONoMultithreading

      public ktxBasisParams uastcRDONoMultithreading(boolean value)
      Sets the specified value to the uastcRDONoMultithreading field.
    • set

      public ktxBasisParams set(int structSize, boolean uastc, boolean verbose, boolean noSSE, int threadCount, int compressionLevel, int qualityLevel, int maxEndpoints, float endpointRDOThreshold, int maxSelectors, float selectorRDOThreshold, ByteBuffer inputSwizzle, boolean normalMap, boolean separateRGToRGB_A, boolean preSwizzle, boolean noEndpointRDO, boolean noSelectorRDO, int uastcFlags, boolean uastcRDO, float uastcRDOQualityScalar, int uastcRDODictSize, float uastcRDOMaxSmoothBlockErrorScale, float uastcRDOMaxSmoothBlockStdDev, boolean uastcRDODontFavorSimplerModes, boolean uastcRDONoMultithreading)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static ktxBasisParams.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new ktxBasisParams.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().
    • nuastc

      public static boolean nuastc(long struct)
      Unsafe version of uastc().
    • nverbose

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

      public static boolean nnoSSE(long struct)
      Unsafe version of noSSE().
    • nthreadCount

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

      public static int ncompressionLevel(long struct)
      Unsafe version of compressionLevel().
    • nqualityLevel

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

      public static int nmaxEndpoints(long struct)
      Unsafe version of maxEndpoints().
    • nendpointRDOThreshold

      public static float nendpointRDOThreshold(long struct)
      Unsafe version of endpointRDOThreshold().
    • nmaxSelectors

      public static int nmaxSelectors(long struct)
      Unsafe version of maxSelectors().
    • nselectorRDOThreshold

      public static float nselectorRDOThreshold(long struct)
      Unsafe version of selectorRDOThreshold().
    • ninputSwizzle

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

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

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

      public static boolean nseparateRGToRGB_A(long struct)
      Unsafe version of separateRGToRGB_A().
    • npreSwizzle

      public static boolean npreSwizzle(long struct)
      Unsafe version of preSwizzle().
    • nnoEndpointRDO

      public static boolean nnoEndpointRDO(long struct)
      Unsafe version of noEndpointRDO().
    • nnoSelectorRDO

      public static boolean nnoSelectorRDO(long struct)
      Unsafe version of noSelectorRDO().
    • nuastcFlags

      public static int nuastcFlags(long struct)
      Unsafe version of uastcFlags().
    • nuastcRDO

      public static boolean nuastcRDO(long struct)
      Unsafe version of uastcRDO().
    • nuastcRDOQualityScalar

      public static float nuastcRDOQualityScalar(long struct)
      Unsafe version of uastcRDOQualityScalar().
    • nuastcRDODictSize

      public static int nuastcRDODictSize(long struct)
      Unsafe version of uastcRDODictSize().
    • nuastcRDOMaxSmoothBlockErrorScale

      public static float nuastcRDOMaxSmoothBlockErrorScale(long struct)
    • nuastcRDOMaxSmoothBlockStdDev

      public static float nuastcRDOMaxSmoothBlockStdDev(long struct)
    • nuastcRDODontFavorSimplerModes

      public static boolean nuastcRDODontFavorSimplerModes(long struct)
    • nuastcRDONoMultithreading

      public static boolean nuastcRDONoMultithreading(long struct)
      Unsafe version of uastcRDONoMultithreading().
    • nstructSize

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

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

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

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

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

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

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

      public static void nmaxEndpoints(long struct, int value)
      Unsafe version of maxEndpoints.
    • nendpointRDOThreshold

      public static void nendpointRDOThreshold(long struct, float value)
      Unsafe version of endpointRDOThreshold.
    • nmaxSelectors

      public static void nmaxSelectors(long struct, int value)
      Unsafe version of maxSelectors.
    • nselectorRDOThreshold

      public static void nselectorRDOThreshold(long struct, float value)
      Unsafe version of selectorRDOThreshold.
    • 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.
    • nnormalMap

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

      public static void nseparateRGToRGB_A(long struct, boolean value)
      Unsafe version of separateRGToRGB_A.
    • npreSwizzle

      public static void npreSwizzle(long struct, boolean value)
      Unsafe version of preSwizzle.
    • nnoEndpointRDO

      public static void nnoEndpointRDO(long struct, boolean value)
      Unsafe version of noEndpointRDO.
    • nnoSelectorRDO

      public static void nnoSelectorRDO(long struct, boolean value)
      Unsafe version of noSelectorRDO.
    • nuastcFlags

      public static void nuastcFlags(long struct, int value)
      Unsafe version of uastcFlags.
    • nuastcRDO

      public static void nuastcRDO(long struct, boolean value)
      Unsafe version of uastcRDO.
    • nuastcRDOQualityScalar

      public static void nuastcRDOQualityScalar(long struct, float value)
      Unsafe version of uastcRDOQualityScalar.
    • nuastcRDODictSize

      public static void nuastcRDODictSize(long struct, int value)
      Unsafe version of uastcRDODictSize.
    • nuastcRDOMaxSmoothBlockErrorScale

      public static void nuastcRDOMaxSmoothBlockErrorScale(long struct, float value)
    • nuastcRDOMaxSmoothBlockStdDev

      public static void nuastcRDOMaxSmoothBlockStdDev(long struct, float value)
      Unsafe version of uastcRDOMaxSmoothBlockStdDev.
    • nuastcRDODontFavorSimplerModes

      public static void nuastcRDODontFavorSimplerModes(long struct, boolean value)
    • nuastcRDONoMultithreading

      public static void nuastcRDONoMultithreading(long struct, boolean value)
      Unsafe version of uastcRDONoMultithreading.