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
layout
must be a validVkImageLayout
value
Member documentation
attachment
– the index of the attachment of the render pass, and corresponds to the index of the corresponding element in thepAttachments
array of theVkRenderPassCreateInfo
structure. If any color or depth/stencil attachments areATTACHMENT_UNUSED
, then no writes occur for those attachments.layout
– aVkImageLayout
value 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 class
VkAttachmentReference.Buffer
An array ofVkAttachmentReference
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 aVkAttachmentReference
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
attachment()
Returns the value of theattachment
field.VkAttachmentReference
attachment(int value)
Sets the specified value to theattachment
field.static VkAttachmentReference
calloc()
Returns a newVkAttachmentReference
instance allocated withmemCalloc
.static VkAttachmentReference.Buffer
calloc(int capacity)
Returns a newVkAttachmentReference.Buffer
instance allocated withmemCalloc
.static VkAttachmentReference
callocStack()
Returns a newVkAttachmentReference
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkAttachmentReference.Buffer
callocStack(int capacity)
Returns a newVkAttachmentReference.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkAttachmentReference.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkAttachmentReference.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkAttachmentReference
callocStack(MemoryStack stack)
Returns a newVkAttachmentReference
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkAttachmentReference
create()
Returns a newVkAttachmentReference
instance allocated withBufferUtils
.static VkAttachmentReference.Buffer
create(int capacity)
Returns a newVkAttachmentReference.Buffer
instance allocated withBufferUtils
.static VkAttachmentReference
create(long address)
Returns a newVkAttachmentReference
instance for the specified memory address ornull
if the address isNULL
.static VkAttachmentReference.Buffer
create(long address, int capacity)
Create aVkAttachmentReference.Buffer
instance at the specified memory.int
layout()
Returns the value of thelayout
field.VkAttachmentReference
layout(int value)
Sets the specified value to thelayout
field.static VkAttachmentReference
malloc()
Returns a newVkAttachmentReference
instance allocated withmemAlloc
.static VkAttachmentReference.Buffer
malloc(int capacity)
Returns a newVkAttachmentReference.Buffer
instance allocated withmemAlloc
.static VkAttachmentReference
mallocStack()
Returns a newVkAttachmentReference
instance allocated on the thread-localMemoryStack
.static VkAttachmentReference.Buffer
mallocStack(int capacity)
Returns a newVkAttachmentReference.Buffer
instance allocated on the thread-localMemoryStack
.static VkAttachmentReference.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkAttachmentReference.Buffer
instance allocated on the specifiedMemoryStack
.static VkAttachmentReference
mallocStack(MemoryStack stack)
Returns a newVkAttachmentReference
instance allocated on the specifiedMemoryStack
.VkAttachmentReference
nset(long struct)
Unsafe version ofset
.VkAttachmentReference
set(int attachment, int layout)
Initializes this struct with the specified values.VkAttachmentReference
set(VkAttachmentReference src)
Copies the specified struct data to this struct.int
sizeof()
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 aVkAttachmentReference
instance at the current position of the specifiedByteBuffer
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()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
attachment
public int attachment()
Returns the value of theattachment
field.
-
layout
public int layout()
Returns the value of thelayout
field.
-
attachment
public VkAttachmentReference attachment(int value)
Sets the specified value to theattachment
field.
-
layout
public VkAttachmentReference layout(int value)
Sets the specified value to thelayout
field.
-
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 newVkAttachmentReference
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkAttachmentReference calloc()
Returns a newVkAttachmentReference
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkAttachmentReference create()
Returns a newVkAttachmentReference
instance allocated withBufferUtils
.
-
create
public static VkAttachmentReference create(long address)
Returns a newVkAttachmentReference
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkAttachmentReference.Buffer malloc(int capacity)
Returns a newVkAttachmentReference.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkAttachmentReference.Buffer calloc(int capacity)
Returns a newVkAttachmentReference.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkAttachmentReference.Buffer create(int capacity)
Returns a newVkAttachmentReference.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkAttachmentReference.Buffer create(long address, int capacity)
Create aVkAttachmentReference.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkAttachmentReference mallocStack()
Returns a newVkAttachmentReference
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkAttachmentReference callocStack()
Returns a newVkAttachmentReference
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkAttachmentReference mallocStack(MemoryStack stack)
Returns a newVkAttachmentReference
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkAttachmentReference callocStack(MemoryStack stack)
Returns a newVkAttachmentReference
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkAttachmentReference.Buffer callocStack(int capacity)
Returns a newVkAttachmentReference.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkAttachmentReference.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkAttachmentReference.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-