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, NativeResource, Pointer
public class VkAttachmentReference extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes a render pass attachment and what layout the attachment image will be in during a subpass.
Valid Usage
layoutmust be a validVkImageLayoutvalue
Member documentation
attachment– the index of the attachment of the render pass, and corresponds to the index of the corresponding element in thepAttachmentsarray of theVkRenderPassCreateInfostructure. If any color or depth/stencil attachments areATTACHMENT_UNUSED, then no writes occur for those attachments.layout– aVkImageLayoutvalue specifying the layout the attachment uses during the subpass. The implementation will automatically perform layout transitions as needed between subpasses to make each subpass use the requested layouts. One of:
Layout
struct VkAttachmentReference { uint32_t attachment; VkImageLayout layout; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkAttachmentReference.BufferAn array ofVkAttachmentReferencestructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and 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 and 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, MemoryStack stack)Returns a newVkAttachmentReference.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAttachmentReferencecallocStack(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 ornullif the address isNULL.static VkAttachmentReference.Buffercreate(long address, int capacity)Create aVkAttachmentReference.Bufferinstance at the specified memory.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, MemoryStack stack)Returns a newVkAttachmentReference.Bufferinstance allocated on the specifiedMemoryStack.static VkAttachmentReferencemallocStack(MemoryStack stack)Returns a newVkAttachmentReferenceinstance allocated on the specifiedMemoryStack.VkAttachmentReferencenset(long struct)Unsafe version ofset.VkAttachmentReferenceset(int attachment, int layout)Initializes this struct with the specified values.VkAttachmentReferenceset(VkAttachmentReference src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:StructReturns thesizeof(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.
-
nset
public VkAttachmentReference nset(long struct)
Unsafe version ofset.
-
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 ornullif the address isNULL.
-
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
-
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(MemoryStack stack)
Returns a newVkAttachmentReferenceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkAttachmentReference callocStack(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, 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, 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
-
-