Class ktxVulkanTexture

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

public class ktxVulkanTexture extends org.lwjgl.system.Struct<ktxVulkanTexture> implements org.lwjgl.system.NativeResource
Struct for returning information about the Vulkan texture image created by the ktxTexture_VkUpload* functions.

Creation of these objects is internal to the upload functions.

Layout


 struct ktxVulkanTexture {
     PFN_vkDestroyImage vkDestroyImage();
     PFN_vkFreeMemory vkFreeMemory();
     VkImage image();
     VkFormat imageFormat();
     VkImageLayout imageLayout();
     VkDeviceMemory deviceMemory();
     VkImageViewType viewType();
     uint32_t width();
     uint32_t height();
     uint32_t depth();
     uint32_t levelCount();
     uint32_t layerCount();
     uint64_t allocationId();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int VKDESTROYIMAGE
      The struct member offsets.
    • VKFREEMEMORY

      public static final int VKFREEMEMORY
      The struct member offsets.
    • IMAGE

      public static final int IMAGE
      The struct member offsets.
    • IMAGEFORMAT

      public static final int IMAGEFORMAT
      The struct member offsets.
    • IMAGELAYOUT

      public static final int IMAGELAYOUT
      The struct member offsets.
    • DEVICEMEMORY

      public static final int DEVICEMEMORY
      The struct member offsets.
    • VIEWTYPE

      public static final int VIEWTYPE
      The struct member offsets.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • HEIGHT

      public static final int HEIGHT
      The struct member offsets.
    • DEPTH

      public static final int DEPTH
      The struct member offsets.
    • LEVELCOUNT

      public static final int LEVELCOUNT
      The struct member offsets.
    • LAYERCOUNT

      public static final int LAYERCOUNT
      The struct member offsets.
    • ALLOCATIONID

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

    • ktxVulkanTexture

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

      public long vkDestroyImage()
      pointer to vkDestroyImage function
    • vkFreeMemory

      public long vkFreeMemory()
      pointer to vkFreeMemory function
    • image

      public long image()
      handle to the Vulkan image created by the loader
    • imageFormat

      public int imageFormat()
      format of the image data
    • imageLayout

      public int imageLayout()
      layout of the created image. Has the same value as layout parameter passed to the loader.
    • deviceMemory

      public long deviceMemory()
      the memory (sub)allocation for the image on the Vulkan device. Will not be used with suballocators.
    • viewType

      public int viewType()
      viewType corresponding to image. Reflects the dimensionality, cubeness and arrayness of the image.
    • width

      public int width()
      the width of the image
    • height

      public int height()
      the height of the image
    • depth

      public int depth()
      the depth of the image
    • levelCount

      public int levelCount()
      the number of MIP levels in the image
    • layerCount

      public int layerCount()
      the number of array layers in the image
    • allocationId

      public long allocationId()
      an id referencing suballocation(s)
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nvkDestroyImage(long struct)
      Unsafe version of vkDestroyImage().
    • nvkFreeMemory

      public static long nvkFreeMemory(long struct)
      Unsafe version of vkFreeMemory().
    • nimage

      public static long nimage(long struct)
      Unsafe version of image().
    • nimageFormat

      public static int nimageFormat(long struct)
      Unsafe version of imageFormat().
    • nimageLayout

      public static int nimageLayout(long struct)
      Unsafe version of imageLayout().
    • ndeviceMemory

      public static long ndeviceMemory(long struct)
      Unsafe version of deviceMemory().
    • nviewType

      public static int nviewType(long struct)
      Unsafe version of viewType().
    • nwidth

      public static int nwidth(long struct)
      Unsafe version of width().
    • nheight

      public static int nheight(long struct)
      Unsafe version of height().
    • ndepth

      public static int ndepth(long struct)
      Unsafe version of depth().
    • nlevelCount

      public static int nlevelCount(long struct)
      Unsafe version of levelCount().
    • nlayerCount

      public static int nlayerCount(long struct)
      Unsafe version of layerCount().
    • nallocationId

      public static long nallocationId(long struct)
      Unsafe version of allocationId().