Class VkAttachmentReference

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class VkAttachmentReference
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying an attachment reference.
    Valid Usage
    Valid Usage (Implicit)
    • layout must be a valid VkImageLayout value
    See Also

    VkRenderPassFragmentDensityMapCreateInfoEXT, VkSubpassDescription

    Member documentation

    • attachment – either an integer value identifying an attachment at the corresponding index in VkRenderPassCreateInfo::pAttachments, or ATTACHMENT_UNUSED to signify that this attachment is not used.
    • layout – a VkImageLayout value specifying the layout the attachment uses during the subpass.

    Layout

    
     struct VkAttachmentReference {
         uint32_t attachment;
         VkImageLayout layout;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ATTACHMENT, LAYOUT

        The struct member offsets.
    • Constructor Detail

      • VkAttachmentReference

        public VkAttachmentReference​(java.nio.ByteBuffer container)
        Creates a VkAttachmentReference 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • attachment

        public int attachment()
        Returns the value of the attachment field.
      • layout

        public int layout()
        Returns the value of the layout field.
      • attachment

        public VkAttachmentReference attachment​(int value)
        Sets the specified value to the attachment field.
      • layout

        public VkAttachmentReference layout​(int value)
        Sets the specified value to the layout field.
      • set

        public VkAttachmentReference set​(int attachment,
                                         int layout)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

        public static VkAttachmentReference mallocStack()
        Returns a new VkAttachmentReference instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VkAttachmentReference callocStack()
        Returns a new VkAttachmentReference instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static VkAttachmentReference mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkAttachmentReference instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

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

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

        public static VkAttachmentReference.Buffer callocStack​(int capacity,
                                                               org.lwjgl.system.MemoryStack stack)
        Returns a new VkAttachmentReference.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nattachment

        public static int nattachment​(long struct)
        Unsafe version of attachment().
      • nlayout

        public static int nlayout​(long struct)
        Unsafe version of layout().
      • nattachment

        public static void nattachment​(long struct,
                                       int value)
        Unsafe version of attachment.
      • nlayout

        public static void nlayout​(long struct,
                                   int value)
        Unsafe version of layout.