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.NativeResource
Structure specifying an attachment reference.Valid Usage
- If
attachment
is notATTACHMENT_UNUSED
,layout
must not beIMAGE_LAYOUT_UNDEFINED
orIMAGE_LAYOUT_PREINITIALIZED
Valid Usage (Implicit)
layout
must be a validVkImageLayout
value
See Also
VkRenderPassFragmentDensityMapCreateInfoEXT
,VkSubpassDescription
Member documentation
attachment
– either an integer value identifying an attachment at the corresponding index inVkRenderPassCreateInfo
::pAttachments
, orATTACHMENT_UNUSED
to signify that this attachment is not used.layout
– aVkImageLayout
value 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 class
VkAttachmentReference.Buffer
An array ofVkAttachmentReference
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ATTACHMENT
LAYOUTThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor 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 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, org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentReference.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkAttachmentReference
callocStack(org.lwjgl.system.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.static VkAttachmentReference.Buffer
create(long address, int capacity)
Create aVkAttachmentReference.Buffer
instance at the specified memory.static VkAttachmentReference
createSafe(long address)
static VkAttachmentReference.Buffer
createSafe(long address, int capacity)
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, org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentReference.Buffer
instance allocated on the specifiedMemoryStack
.static VkAttachmentReference
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentReference
instance allocated on the specifiedMemoryStack
.static int
nattachment(long struct)
Unsafe version ofattachment()
.static void
nattachment(long struct, int value)
Unsafe version ofattachment
.static int
nlayout(long struct)
Unsafe version oflayout()
.static void
nlayout(long struct, int value)
Unsafe version oflayout
.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()
-
-
-
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()
- Specified by:
sizeof
in classorg.lwjgl.system.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.
-
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.
-
createSafe
@Nullable public static VkAttachmentReference createSafe(long address)
-
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
-
createSafe
@Nullable public static VkAttachmentReference.Buffer createSafe(long address, int 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(org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentReference
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkAttachmentReference callocStack(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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
-
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
.
-
-