Class VkImageFormatListCreateInfo

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkImageFormatListCreateInfo>
org.lwjgl.vulkan.VkImageFormatListCreateInfo
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
Direct Known Subclasses:
VkImageFormatListCreateInfoKHR

public class VkImageFormatListCreateInfo extends org.lwjgl.system.Struct<VkImageFormatListCreateInfo> implements org.lwjgl.system.NativeResource
Specify that an image can be used with a particular set of formats.
Description

If viewFormatCount is zero, pViewFormats is ignored and the image is created as if the VkImageFormatListCreateInfo structure were not included in the pNext chain of VkImageCreateInfo.

Valid Usage
  • If viewFormatCount is not 0, each element of pViewFormats must not be FORMAT_UNDEFINED
Valid Usage (Implicit)

Layout


 struct VkImageFormatListCreateInfo {
     VkStructureType sType();
     void const * pNext();
     uint32_t viewFormatCount();
     VkFormat const * pViewFormats();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int STYPE
      The struct member offsets.
    • PNEXT

      public static final int PNEXT
      The struct member offsets.
    • VIEWFORMATCOUNT

      public static final int VIEWFORMATCOUNT
      The struct member offsets.
    • PVIEWFORMATS

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

    • VkImageFormatListCreateInfo

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

      public int sType()
      a VkStructureType value identifying this structure.
    • pNext

      public long pNext()
      NULL or a pointer to a structure extending this structure.
    • viewFormatCount

      public int viewFormatCount()
      the number of entries in the pViewFormats array.
    • pViewFormats

      public @Nullable IntBuffer pViewFormats()
      a pointer to an array of VkFormat values specifying all formats which can be used when creating views of this image.
    • sType

      public VkImageFormatListCreateInfo sType(int value)
      Sets the specified value to the sType() field.
    • sType$Default

      public VkImageFormatListCreateInfo sType$Default()
    • pNext

      public VkImageFormatListCreateInfo pNext(long value)
      Sets the specified value to the pNext() field.
    • pViewFormats

      public VkImageFormatListCreateInfo pViewFormats(@Nullable IntBuffer value)
      Sets the address of the specified IntBuffer to the pViewFormats() field.
    • set

      public VkImageFormatListCreateInfo set(int sType, long pNext, @Nullable IntBuffer pViewFormats)
      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 VkImageFormatListCreateInfo malloc()
      Returns a new VkImageFormatListCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nsType(long struct)
      Unsafe version of sType().
    • npNext

      public static long npNext(long struct)
      Unsafe version of pNext().
    • nviewFormatCount

      public static int nviewFormatCount(long struct)
      Unsafe version of viewFormatCount().
    • npViewFormats

      public static @Nullable IntBuffer npViewFormats(long struct)
      Unsafe version of pViewFormats.
    • nsType

      public static void nsType(long struct, int value)
      Unsafe version of sType.
    • npNext

      public static void npNext(long struct, long value)
      Unsafe version of pNext.
    • nviewFormatCount

      public static void nviewFormatCount(long struct, int value)
      Sets the specified value to the viewFormatCount field of the specified struct.
    • npViewFormats

      public static void npViewFormats(long struct, @Nullable IntBuffer value)
      Unsafe version of pViewFormats.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate