Package org.lwjgl.vulkan
Class VkAttachmentReference
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.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.NativeResourceStructure specifying an attachment reference.Valid Usage
- If
attachmentis notATTACHMENT_UNUSED,layoutmust not beIMAGE_LAYOUT_UNDEFINEDorIMAGE_LAYOUT_PREINITIALIZED
Valid Usage (Implicit)
layoutmust be a validVkImageLayoutvalue
See Also
VkRenderPassFragmentDensityMapCreateInfoEXT,VkSubpassDescriptionMember documentation
attachment– either an integer value identifying an attachment at the corresponding index inVkRenderPassCreateInfo::pAttachments, orATTACHMENT_UNUSEDto signify that this attachment is not used.layout– aVkImageLayoutvalue specifying the layout the attachment uses during the subpass.
Layout
struct VkAttachmentReference { uint32_t attachment; VkImageLayout layout; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkAttachmentReference.BufferAn array ofVkAttachmentReferencestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intATTACHMENT
LAYOUTThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkAttachmentReference(java.nio.ByteBuffer container)Creates aVkAttachmentReferenceinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intattachment()Returns the value of theattachmentfield.VkAttachmentReferenceattachment(int value)Sets the specified value to theattachmentfield.static VkAttachmentReferencecalloc()Returns a newVkAttachmentReferenceinstance allocated withmemCalloc.static VkAttachmentReference.Buffercalloc(int capacity)Returns a newVkAttachmentReference.Bufferinstance allocated withmemCalloc.static VkAttachmentReferencecallocStack()Returns a newVkAttachmentReferenceinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkAttachmentReference.BuffercallocStack(int capacity)Returns a newVkAttachmentReference.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkAttachmentReference.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkAttachmentReference.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAttachmentReferencecallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkAttachmentReferenceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAttachmentReferencecreate()Returns a newVkAttachmentReferenceinstance allocated withBufferUtils.static VkAttachmentReference.Buffercreate(int capacity)Returns a newVkAttachmentReference.Bufferinstance allocated withBufferUtils.static VkAttachmentReferencecreate(long address)Returns a newVkAttachmentReferenceinstance for the specified memory address.static VkAttachmentReference.Buffercreate(long address, int capacity)Create aVkAttachmentReference.Bufferinstance at the specified memory.static VkAttachmentReferencecreateSafe(long address)static VkAttachmentReference.BuffercreateSafe(long address, int capacity)intlayout()Returns the value of thelayoutfield.VkAttachmentReferencelayout(int value)Sets the specified value to thelayoutfield.static VkAttachmentReferencemalloc()Returns a newVkAttachmentReferenceinstance allocated withmemAlloc.static VkAttachmentReference.Buffermalloc(int capacity)Returns a newVkAttachmentReference.Bufferinstance allocated withmemAlloc.static VkAttachmentReferencemallocStack()Returns a newVkAttachmentReferenceinstance allocated on the thread-localMemoryStack.static VkAttachmentReference.BuffermallocStack(int capacity)Returns a newVkAttachmentReference.Bufferinstance allocated on the thread-localMemoryStack.static VkAttachmentReference.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkAttachmentReference.Bufferinstance allocated on the specifiedMemoryStack.static VkAttachmentReferencemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkAttachmentReferenceinstance allocated on the specifiedMemoryStack.static intnattachment(long struct)Unsafe version ofattachment().static voidnattachment(long struct, int value)Unsafe version ofattachment.static intnlayout(long struct)Unsafe version oflayout().static voidnlayout(long struct, int value)Unsafe version oflayout.VkAttachmentReferenceset(int attachment, int layout)Initializes this struct with the specified values.VkAttachmentReferenceset(VkAttachmentReference src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
VkAttachmentReference
public VkAttachmentReference(java.nio.ByteBuffer container)
Creates aVkAttachmentReferenceinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
attachment
public int attachment()
Returns the value of theattachmentfield.
-
layout
public int layout()
Returns the value of thelayoutfield.
-
attachment
public VkAttachmentReference attachment(int value)
Sets the specified value to theattachmentfield.
-
layout
public VkAttachmentReference layout(int value)
Sets the specified value to thelayoutfield.
-
set
public VkAttachmentReference set(int attachment, int layout)
Initializes this struct with the specified values.
-
set
public VkAttachmentReference set(VkAttachmentReference src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkAttachmentReference malloc()
Returns a newVkAttachmentReferenceinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkAttachmentReference calloc()
Returns a newVkAttachmentReferenceinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkAttachmentReference create()
Returns a newVkAttachmentReferenceinstance allocated withBufferUtils.
-
create
public static VkAttachmentReference create(long address)
Returns a newVkAttachmentReferenceinstance for the specified memory address.
-
createSafe
@Nullable public static VkAttachmentReference createSafe(long address)
-
malloc
public static VkAttachmentReference.Buffer malloc(int capacity)
Returns a newVkAttachmentReference.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkAttachmentReference.Buffer calloc(int capacity)
Returns a newVkAttachmentReference.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkAttachmentReference.Buffer create(int capacity)
Returns a newVkAttachmentReference.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkAttachmentReference.Buffer create(long address, int capacity)
Create aVkAttachmentReference.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkAttachmentReference.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkAttachmentReference mallocStack()
Returns a newVkAttachmentReferenceinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkAttachmentReference callocStack()
Returns a newVkAttachmentReferenceinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkAttachmentReference mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentReferenceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkAttachmentReference callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentReferenceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkAttachmentReference.Buffer mallocStack(int capacity)
Returns a newVkAttachmentReference.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkAttachmentReference.Buffer callocStack(int capacity)
Returns a newVkAttachmentReference.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkAttachmentReference.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentReference.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkAttachmentReference.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentReference.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nattachment
public static int nattachment(long struct)
Unsafe version ofattachment().
-
nlayout
public static int nlayout(long struct)
Unsafe version oflayout().
-
nattachment
public static void nattachment(long struct, int value)Unsafe version ofattachment.
-
nlayout
public static void nlayout(long struct, int value)Unsafe version oflayout.
-
-