Class ktxTexture2

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

public class ktxTexture2 extends org.lwjgl.system.Struct<ktxTexture2> implements org.lwjgl.system.NativeResource
Class representing a KTX version 2 format texture.

ktxTextures should be created only by one of the ktxTexture_Create* functions and these fields should be considered read-only.

Layout


 struct ktxTexture2 {
     class_id classId();
     struct ktxTexture_vtbl * vtbl();
     struct ktxTexture_vvtbl * vvtbl();
     struct ktxTexture_protected * _protected(int);
     ktx_bool_t isArray();
     ktx_bool_t isCubemap();
     ktx_bool_t isCompressed();
     ktx_bool_t generateMipmaps();
     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();
     struct ktxOrientation orientation();
     ktxHashList kvDataHead();
     ktx_uint32_t kvDataLen();
     ktx_uint8_t * kvData();
     ktx_size_t dataSize();
     ktx_uint8_t * pData();
     ktx_uint32_t vkFormat;
     ktx_uint32_t * pDfd;
     ktxSupercmpScheme supercompressionScheme;
     ktx_bool_t isVideo;
     ktx_uint32_t duration;
     ktx_uint32_t timescale;
     ktx_uint32_t loopcount;
     struct ktxTexture2_private * _private;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int CLASSID
      The struct member offsets.
    • VTBL

      public static final int VTBL
      The struct member offsets.
    • VVTBL

      public static final int VVTBL
      The struct member offsets.
    • _PROTECTED

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

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

      public static final int ISCUBEMAP
      The struct member offsets.
    • ISCOMPRESSED

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

      public static final int GENERATEMIPMAPS
      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.
    • ORIENTATION

      public static final int ORIENTATION
      The struct member offsets.
    • KVDATAHEAD

      public static final int KVDATAHEAD
      The struct member offsets.
    • KVDATALEN

      public static final int KVDATALEN
      The struct member offsets.
    • KVDATA

      public static final int KVDATA
      The struct member offsets.
    • DATASIZE

      public static final int DATASIZE
      The struct member offsets.
    • PDATA

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

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

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

      public static final int SUPERCOMPRESSIONSCHEME
      The struct member offsets.
    • ISVIDEO

      public static final int ISVIDEO
      The struct member offsets.
    • DURATION

      public static final int DURATION
      The struct member offsets.
    • TIMESCALE

      public static final int TIMESCALE
      The struct member offsets.
    • LOOPCOUNT

      public static final int LOOPCOUNT
      The struct member offsets.
    • _PRIVATE

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

    • ktxTexture2

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

      public int classId()
    • vtbl

      public ktxTexture_vtbl vtbl()
      pointer to the class's vtble
    • vvtbl

      public long vvtbl()
      pointer to the class's vtble for Vulkan functions
    • _protected

      public org.lwjgl.PointerBuffer _protected(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      opaque pointer to the class's protected variables
    • isArray

      public boolean isArray()
      TRUE if the texture is an array texture, i.e, a GL_TEXTURE*_ARRAY target is to be used
    • isCubemap

      public boolean isCubemap()
      TRUE if the texture is a cubemap or cubemap array
    • isCompressed

      public boolean isCompressed()
      TRUE if the texture's format is a block compressed format
    • generateMipmaps

      public boolean generateMipmaps()
      TRUE if mipmaps should be generated for the texture by Texture_GLUpload or Texture_VkUpload
    • baseWidth

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

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

      public int baseDepth()
      depth of the texture's base level
    • 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.

      Must be 1, if generateMipmaps is TRUE. Can be less than a full pyramid but always starts at the base level.

    • numLayers

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

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

      public ktxOrientation orientation()
      describes the logical orientation of the images in each dimension
    • kvDataHead

      public long kvDataHead()
      head of the hash list of metadata
    • kvDataLen

      public int kvDataLen()
      length of the metadata, if it has been extracted in its raw form, otherwise 0
    • kvData

      public @Nullable ByteBuffer kvData()
      pointer to the metadata, if it has been extracted in its raw form, otherwise NULL
    • dataSize

      public long dataSize()
      byte length of the texture's uncompressed image data
    • pData

      public ByteBuffer pData()
      pointer to the start of the image data
    • vkFormat

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

      public @Nullable IntBuffer pDfd(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      a IntBuffer view of the data pointed to by the pDfd field.
    • supercompressionScheme

      public int supercompressionScheme()
      Returns:
      the value of the supercompressionScheme field.
    • isVideo

      public boolean isVideo()
      Returns:
      the value of the isVideo field.
    • duration

      public int duration()
      Returns:
      the value of the duration field.
    • timescale

      public int timescale()
      Returns:
      the value of the timescale field.
    • loopcount

      public int loopcount()
      Returns:
      the value of the loopcount field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static ktxTexture2.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new ktxTexture2.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
    • nclassId

      public static int nclassId(long struct)
      Unsafe version of classId().
    • nvtbl

      public static ktxTexture_vtbl nvtbl(long struct)
      Unsafe version of vtbl().
    • nvvtbl

      public static long nvvtbl(long struct)
      Unsafe version of vvtbl().
    • n_protected

      public static org.lwjgl.PointerBuffer n_protected(long struct, int capacity)
      Unsafe version of _protected.
    • nisArray

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

      public static boolean nisCubemap(long struct)
      Unsafe version of isCubemap().
    • nisCompressed

      public static boolean nisCompressed(long struct)
      Unsafe version of isCompressed().
    • ngenerateMipmaps

      public static boolean ngenerateMipmaps(long struct)
      Unsafe version of generateMipmaps().
    • 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().
    • norientation

      public static ktxOrientation norientation(long struct)
      Unsafe version of orientation().
    • nkvDataHead

      public static long nkvDataHead(long struct)
      Unsafe version of kvDataHead().
    • nkvDataLen

      public static int nkvDataLen(long struct)
      Unsafe version of kvDataLen().
    • nkvData

      public static @Nullable ByteBuffer nkvData(long struct)
      Unsafe version of kvData.
    • ndataSize

      public static long ndataSize(long struct)
      Unsafe version of dataSize().
    • npData

      public static ByteBuffer npData(long struct)
      Unsafe version of pData.
    • 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.
    • nsupercompressionScheme

      public static int nsupercompressionScheme(long struct)
      Unsafe version of supercompressionScheme().
    • nisVideo

      public static boolean nisVideo(long struct)
      Unsafe version of isVideo().
    • nduration

      public static int nduration(long struct)
      Unsafe version of duration().
    • ntimescale

      public static int ntimescale(long struct)
      Unsafe version of timescale().
    • nloopcount

      public static int nloopcount(long struct)
      Unsafe version of loopcount().
    • n_private

      public static org.lwjgl.PointerBuffer n_private(long struct, int capacity)