Package org.lwjgl.vulkan
Class VkClearAttachment
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkClearAttachment
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkClearAttachment extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure 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 iclearValuemust be a validVkClearValueunion
Valid Usage (Implicit)
aspectMaskmust be a valid combination ofVkImageAspectFlagBitsvaluesaspectMaskmust not be 0
See Also
VkClearValue,CmdClearAttachmentsLayout
struct VkClearAttachment { VkImageAspectFlagsaspectMask(); uint32_tcolorAttachment();VkClearValueclearValue(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkClearAttachment.BufferAn array ofVkClearAttachmentstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intASPECTMASK
CLEARVALUE
COLORATTACHMENTThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkClearAttachment(java.nio.ByteBuffer container)Creates aVkClearAttachmentinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intaspectMask()a mask selecting the color, depth and/or stencil aspects of the attachment to be cleared.VkClearAttachmentaspectMask(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 VkClearAttachmentcallocStack()Deprecated.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.VkClearValueclearValue()the color or depth/stencil value to clear the attachment to, as described in Clear Values below.VkClearAttachmentclearValue(java.util.function.Consumer<VkClearValue> consumer)Passes theclearValue()field to the specifiedConsumer.VkClearAttachmentclearValue(VkClearValue value)Copies the specifiedVkClearValueto theclearValue()field.intcolorAttachment()only meaningful ifIMAGE_ASPECT_COLOR_BITis set inaspectMask, in which case it is an index into the currently bound color attachments.VkClearAttachmentcolorAttachment(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 VkClearAttachmentcreateSafe(long address)static 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 VkClearAttachmentmallocStack()Deprecated.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.VkClearAttachmentset(int aspectMask, int colorAttachment, VkClearValue clearValue)Initializes this struct with the specified values.VkClearAttachmentset(VkClearAttachment src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
VkClearAttachment
public VkClearAttachment(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
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 currently bound color attachments.
-
clearValue
public VkClearValue clearValue()
the color or depth/stencil value to clear the attachment to, as described in Clear Values below.
-
aspectMask
public VkClearAttachment aspectMask(int value)
Sets the specified value to theaspectMask()field.
-
colorAttachment
public VkClearAttachment colorAttachment(int value)
Sets the specified value to thecolorAttachment()field.
-
clearValue
public VkClearAttachment clearValue(VkClearValue value)
Copies the specifiedVkClearValueto theclearValue()field.
-
clearValue
public VkClearAttachment clearValue(java.util.function.Consumer<VkClearValue> consumer)
Passes theclearValue()field to the specifiedConsumer.
-
set
public VkClearAttachment set(int aspectMask, int colorAttachment, VkClearValue clearValue)
Initializes this struct with the specified values.
-
set
public VkClearAttachment set(VkClearAttachment src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkClearAttachment malloc()
Returns a newVkClearAttachmentinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkClearAttachment calloc()
Returns a newVkClearAttachmentinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkClearAttachment create()
Returns a newVkClearAttachmentinstance allocated withBufferUtils.
-
create
public static VkClearAttachment create(long address)
Returns a newVkClearAttachmentinstance for the specified memory address.
-
createSafe
@Nullable public static VkClearAttachment createSafe(long address)
-
malloc
public static VkClearAttachment.Buffer malloc(int capacity)
Returns a newVkClearAttachment.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkClearAttachment.Buffer calloc(int capacity)
Returns a newVkClearAttachment.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkClearAttachment.Buffer create(int capacity)
Returns a newVkClearAttachment.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkClearAttachment.Buffer create(long address, int capacity)
Create aVkClearAttachment.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkClearAttachment.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkClearAttachment mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkClearAttachment callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkClearAttachment mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkClearAttachment callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkClearAttachment.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkClearAttachment.Buffer callocStack(int capacity)
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
public static VkClearAttachment malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkClearAttachmentinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkClearAttachment calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkClearAttachmentinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkClearAttachment.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkClearAttachment.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkClearAttachment.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkClearAttachment.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
naspectMask
public static int naspectMask(long struct)
Unsafe version ofaspectMask().
-
ncolorAttachment
public static int ncolorAttachment(long struct)
Unsafe version ofcolorAttachment().
-
nclearValue
public static VkClearValue nclearValue(long struct)
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
public static void nclearValue(long struct, VkClearValue value)Unsafe version ofclearValue.
-
-