Class ktxTextureCreateInfo

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<ktxTextureCreateInfo>
org.lwjgl.util.ktx.ktxTextureCreateInfo
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class ktxTextureCreateInfo extends org.lwjgl.system.Struct<ktxTextureCreateInfo> implements org.lwjgl.system.NativeResource
Structure for passing texture information to Texture1_Create and Texture2_Create.

Layout


 struct ktxTextureCreateInfo {
     ktx_uint32_t glInternalformat();
     ktx_uint32_t vkFormat();
     ktx_uint32_t * pDfd(int);
     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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<ktxTextureCreateInfo>
    • glInternalformat

      public int glInternalformat()
      internal format for the texture, e.g., GL_RGB8. Ignored when creating a ktxTexture2.
    • vkFormat

      public int vkFormat()
      vkFormat for texture. Ignored when creating a ktxTexture1.
    • pDfd

      public @Nullable IntBuffer pDfd(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      pointer to DFD. Used only when creating a ktxTexture2 and only if vkFormat is VK_FORMAT_UNDEFINED.
    • baseWidth

      public int baseWidth()
      width of the base level of the texture
    • baseHeight

      public int baseHeight()
      height of the base level of the texture
    • baseDepth

      public int baseDepth()
      depth of the base level of the texture
    • numDimensions

      public int numDimensions()
      number of dimensions in the texture, 1, 2 or 3
    • numLevels

      public int numLevels()
      number of mip levels in the texture. Should be 1 if generateMipmaps is TRUE.
    • numLayers

      public int numLayers()
      number of array layers in the texture
    • numFaces

      public int numFaces()
      number of faces: 6 for cube maps, 1 otherwise
    • isArray

      public boolean isArray()
      set to TRUE if the texture is to be an array texture. Means OpenGL will use a GL_TEXTURE_*_ARRAY target.
    • generateMipmaps

      public boolean generateMipmaps()
      set to TRUE if mipmaps should be generated for the texture when loading into a 3D API
    • 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(int) 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(org.lwjgl.system.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(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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.