Class ktxTextureCreateInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ktxTextureCreateInfo extends Struct<ktxTextureCreateInfo> implements NativeResource

 struct ktxTextureCreateInfo {
     ktx_uint32_t glInternalformat;
     ktx_uint32_t vkFormat;
     ktx_uint32_t * pDfd;
     ktx_uint32_t baseWidth;
     ktx_uint32_t baseHeight;
     ktx_uint32_t baseDepth;
     ktx_uint32_t numDimensions;
     ktx_uint32_t numLevels;
     ktx_uint32_t numLayers;
     ktx_uint32_t numFaces;
     ktx_bool_t isArray;
     ktx_bool_t generateMipmaps;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int GLINTERNALFORMAT
      The struct member offsets.
    • VKFORMAT

      public static final int VKFORMAT
      The struct member offsets.
    • PDFD

      public static final int PDFD
      The struct member offsets.
    • BASEWIDTH

      public static final int BASEWIDTH
      The struct member offsets.
    • BASEHEIGHT

      public static final int BASEHEIGHT
      The struct member offsets.
    • BASEDEPTH

      public static final int BASEDEPTH
      The struct member offsets.
    • NUMDIMENSIONS

      public static final int NUMDIMENSIONS
      The struct member offsets.
    • NUMLEVELS

      public static final int NUMLEVELS
      The struct member offsets.
    • NUMLAYERS

      public static final int NUMLAYERS
      The struct member offsets.
    • NUMFACES

      public static final int NUMFACES
      The struct member offsets.
    • ISARRAY

      public static final int ISARRAY
      The struct member offsets.
    • GENERATEMIPMAPS

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

    • ktxTextureCreateInfo

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

      public int glInternalformat()
      Returns:
      the value of the glInternalformat field.
    • vkFormat

      public int vkFormat()
      Returns:
      the value of the vkFormat field.
    • pDfd

      public @Nullable IntBuffer pDfd(int capacity)
      Returns:
      a IntBuffer view of the data pointed to by the pDfd field.
    • baseWidth

      public int baseWidth()
      Returns:
      the value of the baseWidth field.
    • baseHeight

      public int baseHeight()
      Returns:
      the value of the baseHeight field.
    • baseDepth

      public int baseDepth()
      Returns:
      the value of the baseDepth field.
    • numDimensions

      public int numDimensions()
      Returns:
      the value of the numDimensions field.
    • numLevels

      public int numLevels()
      Returns:
      the value of the numLevels field.
    • numLayers

      public int numLayers()
      Returns:
      the value of the numLayers field.
    • numFaces

      public int numFaces()
      Returns:
      the value of the numFaces field.
    • isArray

      public boolean isArray()
      Returns:
      the value of the isArray field.
    • generateMipmaps

      public boolean generateMipmaps()
      Returns:
      the value of the generateMipmaps field.
    • glInternalformat

      public ktxTextureCreateInfo glInternalformat(int value)
      Sets the specified value to the glInternalformat field.
    • vkFormat

      public ktxTextureCreateInfo vkFormat(int value)
      Sets the specified value to the vkFormat field.
    • pDfd

      public ktxTextureCreateInfo pDfd(@Nullable IntBuffer value)
      Sets the address of the specified IntBuffer to the pDfd field.
    • baseWidth

      public ktxTextureCreateInfo baseWidth(int value)
      Sets the specified value to the baseWidth field.
    • baseHeight

      public ktxTextureCreateInfo baseHeight(int value)
      Sets the specified value to the baseHeight field.
    • baseDepth

      public ktxTextureCreateInfo baseDepth(int value)
      Sets the specified value to the baseDepth field.
    • numDimensions

      public ktxTextureCreateInfo numDimensions(int value)
      Sets the specified value to the numDimensions field.
    • numLevels

      public ktxTextureCreateInfo numLevels(int value)
      Sets the specified value to the numLevels field.
    • numLayers

      public ktxTextureCreateInfo numLayers(int value)
      Sets the specified value to the numLayers field.
    • numFaces

      public ktxTextureCreateInfo numFaces(int value)
      Sets the specified value to the numFaces field.
    • isArray

      public ktxTextureCreateInfo isArray(boolean value)
      Sets the specified value to the isArray field.
    • generateMipmaps

      public ktxTextureCreateInfo generateMipmaps(boolean value)
      Sets the specified value to the generateMipmaps field.
    • set

      public ktxTextureCreateInfo set(int glInternalformat, int vkFormat, @Nullable IntBuffer pDfd, int baseWidth, int baseHeight, int baseDepth, int numDimensions, int numLevels, int numLayers, int numFaces, boolean isArray, boolean generateMipmaps)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nglInternalformat(long struct)
      Unsafe version of glInternalformat().
    • nvkFormat

      public static int nvkFormat(long struct)
      Unsafe version of vkFormat().
    • npDfd

      public static @Nullable IntBuffer npDfd(long struct, int capacity)
      Unsafe version of pDfd.
    • nbaseWidth

      public static int nbaseWidth(long struct)
      Unsafe version of baseWidth().
    • nbaseHeight

      public static int nbaseHeight(long struct)
      Unsafe version of baseHeight().
    • nbaseDepth

      public static int nbaseDepth(long struct)
      Unsafe version of baseDepth().
    • nnumDimensions

      public static int nnumDimensions(long struct)
      Unsafe version of numDimensions().
    • nnumLevels

      public static int nnumLevels(long struct)
      Unsafe version of numLevels().
    • nnumLayers

      public static int nnumLayers(long struct)
      Unsafe version of numLayers().
    • nnumFaces

      public static int nnumFaces(long struct)
      Unsafe version of numFaces().
    • nisArray

      public static boolean nisArray(long struct)
      Unsafe version of isArray().
    • ngenerateMipmaps

      public static boolean ngenerateMipmaps(long struct)
      Unsafe version of generateMipmaps().
    • nglInternalformat

      public static void nglInternalformat(long struct, int value)
      Unsafe version of glInternalformat.
    • nvkFormat

      public static void nvkFormat(long struct, int value)
      Unsafe version of vkFormat.
    • npDfd

      public static void npDfd(long struct, @Nullable IntBuffer value)
      Unsafe version of pDfd.
    • nbaseWidth

      public static void nbaseWidth(long struct, int value)
      Unsafe version of baseWidth.
    • nbaseHeight

      public static void nbaseHeight(long struct, int value)
      Unsafe version of baseHeight.
    • nbaseDepth

      public static void nbaseDepth(long struct, int value)
      Unsafe version of baseDepth.
    • nnumDimensions

      public static void nnumDimensions(long struct, int value)
      Unsafe version of numDimensions.
    • nnumLevels

      public static void nnumLevels(long struct, int value)
      Unsafe version of numLevels.
    • nnumLayers

      public static void nnumLayers(long struct, int value)
      Unsafe version of numLayers.
    • nnumFaces

      public static void nnumFaces(long struct, int value)
      Unsafe version of numFaces.
    • nisArray

      public static void nisArray(long struct, boolean value)
      Unsafe version of isArray.
    • ngenerateMipmaps

      public static void ngenerateMipmaps(long struct, boolean value)
      Unsafe version of generateMipmaps.