Class VkImportMetalTextureInfoEXT

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkImportMetalTextureInfoEXT>
org.lwjgl.vulkan.VkImportMetalTextureInfoEXT
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VkImportMetalTextureInfoEXT extends org.lwjgl.system.Struct<VkImportMetalTextureInfoEXT> implements org.lwjgl.system.NativeResource
Structure that identifies Metal MTLTexture objects to use when creating a VkImage.
Description

The pNext chain must include one VkImportMetalTextureInfoEXT structure for each plane in the VkImage. The application must ensure that the configuration of the Metal id&lt;MTLTexture&gt; objects are compatible with the configuration of the VkImage. Failure to do so results in undefined behavior.

Valid Usage (Implicit)

Layout


 struct VkImportMetalTextureInfoEXT {
     VkStructureType sType();
     void const * pNext();
     VkImageAspectFlagBits plane();
     MTLTexture_id mtlTexture();
 }
  • 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.
    • PLANE

      public static final int PLANE
      The struct member offsets.
    • MTLTEXTURE

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

    • VkImportMetalTextureInfoEXT

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

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

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

      public int plane()
      specifies the plane of the VkImage that the id&lt;MTLTexture&gt; object should be attached to.
    • mtlTexture

      public long mtlTexture()
      a the Metal id&lt;MTLTexture&gt; object that is to underlie the VkImage plane.
    • sType

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

      public VkImportMetalTextureInfoEXT sType$Default()
    • pNext

      public VkImportMetalTextureInfoEXT pNext(long value)
      Sets the specified value to the pNext() field.
    • plane

      public VkImportMetalTextureInfoEXT plane(int value)
      Sets the specified value to the plane() field.
    • mtlTexture

      public VkImportMetalTextureInfoEXT mtlTexture(long value)
      Sets the specified value to the mtlTexture() field.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nplane(long struct)
      Unsafe version of plane().
    • nmtlTexture

      public static long nmtlTexture(long struct)
      Unsafe version of mtlTexture().
    • 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.
    • nplane

      public static void nplane(long struct, int value)
      Unsafe version of plane.
    • nmtlTexture

      public static void nmtlTexture(long struct, long value)
      Unsafe version of mtlTexture.
    • validate

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