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, NativeResource, Pointer
public class VkClearAttachment extends Struct
Khronos Reference Page
Vulkan SpecificationDefines an attachment to clear and the clear values to use.
Valid Usage
aspectMaskmust be a valid combination ofVkImageAspectFlagBitsvaluesaspectMaskmust not be 0- If
aspectMaskincludesIMAGE_ASPECT_COLOR_BIT, it must not includeIMAGE_ASPECT_DEPTH_BITorIMAGE_ASPECT_STENCIL_BIT aspectMaskmust not includeIMAGE_ASPECT_METADATA_BIT
Member documentation
aspectMask– a bitmask selecting the color, depth and/or stencil aspects of the attachment to be cleared. One or more of:IMAGE_ASPECT_COLOR_BITIMAGE_ASPECT_DEPTH_BITIMAGE_ASPECT_METADATA_BITIMAGE_ASPECT_STENCIL_BITcolorAttachment– is only meaningful ifIMAGE_ASPECT_COLOR_BITis set inaspectMask, in which case it is an index to thepColorAttachmentsarray in theVkSubpassDescriptionstructure of the current subpass which selects the color attachment to clearclearValue– the color or depth/stencil value to clear the attachment to
Layout
struct VkClearAttachment { VkImageAspectFlags aspectMask; uint32_t colorAttachment;VkClearValueclearValue; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkClearAttachment.BufferAn array ofVkClearAttachmentstructs.-
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 VkClearAttachment(java.nio.ByteBuffer container)Creates aVkClearAttachmentinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intaspectMask()Returns the value of theaspectMaskfield.VkClearAttachmentaspectMask(int value)Sets the specified value to theaspectMaskfield.static VkClearAttachmentcalloc()Returns a newVkClearAttachmentinstance allocated withmemCalloc.static VkClearAttachment.Buffercalloc(int capacity)Returns a newVkClearAttachment.Bufferinstance allocated withmemCalloc.static VkClearAttachmentcallocStack()Returns a newVkClearAttachmentinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkClearAttachment.BuffercallocStack(int capacity)Returns a newVkClearAttachment.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkClearAttachment.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkClearAttachment.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkClearAttachmentcallocStack(MemoryStack stack)Returns a newVkClearAttachmentinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.VkClearValueclearValue()Returns aVkClearValueview of theclearValuefield.VkClearAttachmentclearValue(VkClearValue value)Copies the specifiedVkClearValueto theclearValuefield.intcolorAttachment()Returns the value of thecolorAttachmentfield.VkClearAttachmentcolorAttachment(int value)Sets the specified value to thecolorAttachmentfield.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 ornullif the address isNULL.static VkClearAttachment.Buffercreate(long address, int capacity)Create aVkClearAttachment.Bufferinstance at the specified memory.static VkClearAttachmentmalloc()Returns a newVkClearAttachmentinstance allocated withmemAlloc.static VkClearAttachment.Buffermalloc(int capacity)Returns a newVkClearAttachment.Bufferinstance allocated withmemAlloc.static VkClearAttachmentmallocStack()Returns a newVkClearAttachmentinstance allocated on the thread-localMemoryStack.static VkClearAttachment.BuffermallocStack(int capacity)Returns a newVkClearAttachment.Bufferinstance allocated on the thread-localMemoryStack.static VkClearAttachment.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkClearAttachment.Bufferinstance allocated on the specifiedMemoryStack.static VkClearAttachmentmallocStack(MemoryStack stack)Returns a newVkClearAttachmentinstance allocated on the specifiedMemoryStack.VkClearAttachmentnset(long struct)Unsafe version ofset.VkClearAttachmentset(VkClearAttachment 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
-
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()
Description copied from class:StructReturns thesizeof(struct).
-
aspectMask
public int aspectMask()
Returns the value of theaspectMaskfield.
-
colorAttachment
public int colorAttachment()
Returns the value of thecolorAttachmentfield.
-
clearValue
public VkClearValue clearValue()
Returns aVkClearValueview of theclearValuefield.
-
aspectMask
public VkClearAttachment aspectMask(int value)
Sets the specified value to theaspectMaskfield.
-
colorAttachment
public VkClearAttachment colorAttachment(int value)
Sets the specified value to thecolorAttachmentfield.
-
clearValue
public VkClearAttachment clearValue(VkClearValue value)
Copies the specifiedVkClearValueto theclearValuefield.
-
nset
public VkClearAttachment nset(long struct)
Unsafe version ofset.
-
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 ornullif the address isNULL.
-
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
-
mallocStack
public static VkClearAttachment mallocStack()
Returns a newVkClearAttachmentinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkClearAttachment callocStack()
Returns a newVkClearAttachmentinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkClearAttachment mallocStack(MemoryStack stack)
Returns a newVkClearAttachmentinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkClearAttachment callocStack(MemoryStack stack)
Returns a newVkClearAttachmentinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkClearAttachment.Buffer mallocStack(int capacity)
Returns a newVkClearAttachment.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkClearAttachment.Buffer callocStack(int capacity)
Returns a newVkClearAttachment.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkClearAttachment.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkClearAttachment.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkClearAttachment.Buffer callocStack(int capacity, 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
-
-