Package org.lwjgl.vulkan
Class VkClearAttachment
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkClearAttachment>
org.lwjgl.vulkan.VkClearAttachment
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkClearAttachment
extends org.lwjgl.system.Struct<VkClearAttachment>
implements org.lwjgl.system.NativeResource
Structure specifying a clear attachment.
Valid Usage
- If
aspectMaskincludesIMAGE_ASPECT_COLOR_BIT, it must not includeIMAGE_ASPECT_DEPTH_BITorIMAGE_ASPECT_STENCIL_BIT aspectMaskmust not includeIMAGE_ASPECT_METADATA_BITaspectMaskmust not includeVK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXTfor any index i
Valid Usage (Implicit)
aspectMaskmust be a valid combination ofVkImageAspectFlagBitsvaluesaspectMaskmust not be 0
See Also
VkClearValue, CmdClearAttachments
Layout
struct VkClearAttachment {
VkImageAspectFlags aspectMask();
uint32_t colorAttachment();
VkClearValue clearValue();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkClearAttachment(ByteBuffer container) Creates aVkClearAttachmentinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptioninta mask selecting the color, depth and/or stencil aspects of the attachment to be cleared.aspectMask(int value) Sets the specified value to theaspectMask()field.static VkClearAttachmentcalloc()Returns a newVkClearAttachmentinstance allocated withmemCalloc.static VkClearAttachment.Buffercalloc(int capacity) Returns a newVkClearAttachment.Bufferinstance allocated withmemCalloc.static VkClearAttachment.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkClearAttachment.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkClearAttachmentcalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkClearAttachmentinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkClearAttachmentDeprecated.static VkClearAttachment.BuffercallocStack(int capacity) Deprecated.static VkClearAttachment.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkClearAttachmentcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.the color or depth/stencil value to clear the attachment to, as described in Clear Values below.clearValue(Consumer<VkClearValue> consumer) Passes theclearValue()field to the specifiedConsumer.clearValue(VkClearValue value) Copies the specifiedVkClearValueto theclearValue()field.intonly meaningful ifIMAGE_ASPECT_COLOR_BITis set inaspectMask, in which case it is an index into the bound color attachments.colorAttachment(int value) Sets the specified value to thecolorAttachment()field.static VkClearAttachmentcreate()Returns a newVkClearAttachmentinstance allocated withBufferUtils.static VkClearAttachment.Buffercreate(int capacity) Returns a newVkClearAttachment.Bufferinstance allocated withBufferUtils.static VkClearAttachmentcreate(long address) Returns a newVkClearAttachmentinstance for the specified memory address.static VkClearAttachment.Buffercreate(long address, int capacity) Create aVkClearAttachment.Bufferinstance at the specified memory.static @Nullable VkClearAttachmentcreateSafe(long address) static @Nullable VkClearAttachment.BuffercreateSafe(long address, int capacity) static VkClearAttachmentmalloc()Returns a newVkClearAttachmentinstance allocated withmemAlloc.static VkClearAttachment.Buffermalloc(int capacity) Returns a newVkClearAttachment.Bufferinstance allocated withmemAlloc.static VkClearAttachment.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkClearAttachment.Bufferinstance allocated on the specifiedMemoryStack.static VkClearAttachmentmalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkClearAttachmentinstance allocated on the specifiedMemoryStack.static VkClearAttachmentDeprecated.static VkClearAttachment.BuffermallocStack(int capacity) Deprecated.static VkClearAttachment.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkClearAttachmentmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static intnaspectMask(long struct) Unsafe version ofaspectMask().static voidnaspectMask(long struct, int value) Unsafe version ofaspectMask.static VkClearValuenclearValue(long struct) Unsafe version ofclearValue().static voidnclearValue(long struct, VkClearValue value) Unsafe version ofclearValue.static intncolorAttachment(long struct) Unsafe version ofcolorAttachment().static voidncolorAttachment(long struct, int value) Unsafe version ofcolorAttachment.set(int aspectMask, int colorAttachment, VkClearValue clearValue) Initializes this struct with the specified values.set(VkClearAttachment src) Copies the specified struct data to this struct.intsizeof()Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
ASPECTMASK
public static final int ASPECTMASKThe struct member offsets. -
COLORATTACHMENT
public static final int COLORATTACHMENTThe struct member offsets. -
CLEARVALUE
public static final int CLEARVALUEThe struct member offsets.
-
-
Constructor Details
-
VkClearAttachment
Creates aVkClearAttachmentinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkClearAttachment>
-
aspectMask
public int aspectMask()a mask selecting the color, depth and/or stencil aspects of the attachment to be cleared. -
colorAttachment
public int colorAttachment()only meaningful ifIMAGE_ASPECT_COLOR_BITis set inaspectMask, in which case it is an index into the bound color attachments. -
clearValue
the color or depth/stencil value to clear the attachment to, as described in Clear Values below. -
aspectMask
Sets the specified value to theaspectMask()field. -
colorAttachment
Sets the specified value to thecolorAttachment()field. -
clearValue
Copies the specifiedVkClearValueto theclearValue()field. -
clearValue
Passes theclearValue()field to the specifiedConsumer. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkClearAttachmentinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkClearAttachmentinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkClearAttachmentinstance allocated withBufferUtils. -
create
Returns a newVkClearAttachmentinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkClearAttachment.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkClearAttachment.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkClearAttachment.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkClearAttachment.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VkClearAttachment.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VkClearAttachment.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkClearAttachmentinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkClearAttachmentinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkClearAttachment.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkClearAttachment.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
naspectMask
public static int naspectMask(long struct) Unsafe version ofaspectMask(). -
ncolorAttachment
public static int ncolorAttachment(long struct) Unsafe version ofcolorAttachment(). -
nclearValue
Unsafe version ofclearValue(). -
naspectMask
public static void naspectMask(long struct, int value) Unsafe version ofaspectMask. -
ncolorAttachment
public static void ncolorAttachment(long struct, int value) Unsafe version ofcolorAttachment. -
nclearValue
Unsafe version ofclearValue.
-