Package org.lwjgl.vulkan
Class VkAttachmentDescription
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkAttachmentDescription
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkAttachmentDescription extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes properties of an attachment.
Valid Usage
flagsmust be a valid combination ofVkAttachmentDescriptionFlagBitsvaluesformatmust be a validVkFormatvaluesamplesmust be a validVkSampleCountFlagBitsvalueloadOpmust be a validVkAttachmentLoadOpvaluestoreOpmust be a validVkAttachmentStoreOpvaluestencilLoadOpmust be a validVkAttachmentLoadOpvaluestencilStoreOpmust be a validVkAttachmentStoreOpvalueinitialLayoutmust be a validVkImageLayoutvaluefinalLayoutmust be a validVkImageLayoutvalue
Member documentation
flags– a bitfield ofVkAttachmentDescriptionFlagBitsdescribing additional properties of the attachment. One or more of:ATTACHMENT_DESCRIPTION_MAY_ALIAS_BITformat– aVkFormatvalue specifying the format of the image that will be used for the attachmentsamples– the number of samples of the image as defined inVkSampleCountFlagBits. One of:SAMPLE_COUNT_16_BITSAMPLE_COUNT_1_BITSAMPLE_COUNT_2_BITSAMPLE_COUNT_32_BITSAMPLE_COUNT_4_BITSAMPLE_COUNT_64_BITSAMPLE_COUNT_8_BITloadOp– specifies how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used. One of:ATTACHMENT_LOAD_OP_CLEARATTACHMENT_LOAD_OP_DONT_CAREATTACHMENT_LOAD_OP_LOADstoreOp– specifies how the contents of color and depth components of the attachment are treated at the end of the subpass where it is last used. One of:ATTACHMENT_STORE_OP_DONT_CAREATTACHMENT_STORE_OP_STOREstencilLoadOp– specifies how the contents of stencil components of the attachment are treated at the beginning of the subpass where it is first used, and must be one of the same values allowed forloadOpstencilStoreOp– specifies how the contents of stencil components of the attachment are treated at the end of the last subpass where it is used, and must be one of the same values allowed forstoreOpinitialLayout– the layout the attachment image subresource will be in when a render pass instance begins. One of:finalLayout– the layout the attachment image subresource will be transitioned to when a render pass instance ends. During a render pass instance, an attachment can use a different layout in each subpass, if desired.
Layout
struct VkAttachmentDescription { VkAttachmentDescriptionFlags flags; VkFormat format; VkSampleCountFlagBits samples; VkAttachmentLoadOp loadOp; VkAttachmentStoreOp storeOp; VkAttachmentLoadOp stencilLoadOp; VkAttachmentStoreOp stencilStoreOp; VkImageLayout initialLayout; VkImageLayout finalLayout; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkAttachmentDescription.BufferAn array ofVkAttachmentDescriptionstructs.-
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 VkAttachmentDescription(java.nio.ByteBuffer container)Creates aVkAttachmentDescriptioninstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkAttachmentDescriptioncalloc()Returns a newVkAttachmentDescriptioninstance allocated withmemCalloc.static VkAttachmentDescription.Buffercalloc(int capacity)Returns a newVkAttachmentDescription.Bufferinstance allocated withmemCalloc.static VkAttachmentDescriptioncallocStack()Returns a newVkAttachmentDescriptioninstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkAttachmentDescription.BuffercallocStack(int capacity)Returns a newVkAttachmentDescription.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkAttachmentDescription.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkAttachmentDescription.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAttachmentDescriptioncallocStack(MemoryStack stack)Returns a newVkAttachmentDescriptioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAttachmentDescriptioncreate()Returns a newVkAttachmentDescriptioninstance allocated withBufferUtils.static VkAttachmentDescription.Buffercreate(int capacity)Returns a newVkAttachmentDescription.Bufferinstance allocated withBufferUtils.static VkAttachmentDescriptioncreate(long address)Returns a newVkAttachmentDescriptioninstance for the specified memory address ornullif the address isNULL.static VkAttachmentDescription.Buffercreate(long address, int capacity)Create aVkAttachmentDescription.Bufferinstance at the specified memory.intfinalLayout()Returns the value of thefinalLayoutfield.VkAttachmentDescriptionfinalLayout(int value)Sets the specified value to thefinalLayoutfield.intflags()Returns the value of theflagsfield.VkAttachmentDescriptionflags(int value)Sets the specified value to theflagsfield.intformat()Returns the value of theformatfield.VkAttachmentDescriptionformat(int value)Sets the specified value to theformatfield.intinitialLayout()Returns the value of theinitialLayoutfield.VkAttachmentDescriptioninitialLayout(int value)Sets the specified value to theinitialLayoutfield.intloadOp()Returns the value of theloadOpfield.VkAttachmentDescriptionloadOp(int value)Sets the specified value to theloadOpfield.static VkAttachmentDescriptionmalloc()Returns a newVkAttachmentDescriptioninstance allocated withmemAlloc.static VkAttachmentDescription.Buffermalloc(int capacity)Returns a newVkAttachmentDescription.Bufferinstance allocated withmemAlloc.static VkAttachmentDescriptionmallocStack()Returns a newVkAttachmentDescriptioninstance allocated on the thread-localMemoryStack.static VkAttachmentDescription.BuffermallocStack(int capacity)Returns a newVkAttachmentDescription.Bufferinstance allocated on the thread-localMemoryStack.static VkAttachmentDescription.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkAttachmentDescription.Bufferinstance allocated on the specifiedMemoryStack.static VkAttachmentDescriptionmallocStack(MemoryStack stack)Returns a newVkAttachmentDescriptioninstance allocated on the specifiedMemoryStack.VkAttachmentDescriptionnset(long struct)Unsafe version ofset.intsamples()Returns the value of thesamplesfield.VkAttachmentDescriptionsamples(int value)Sets the specified value to thesamplesfield.VkAttachmentDescriptionset(int flags, int format, int samples, int loadOp, int storeOp, int stencilLoadOp, int stencilStoreOp, int initialLayout, int finalLayout)Initializes this struct with the specified values.VkAttachmentDescriptionset(VkAttachmentDescription src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).intstencilLoadOp()Returns the value of thestencilLoadOpfield.VkAttachmentDescriptionstencilLoadOp(int value)Sets the specified value to thestencilLoadOpfield.intstencilStoreOp()Returns the value of thestencilStoreOpfield.VkAttachmentDescriptionstencilStoreOp(int value)Sets the specified value to thestencilStoreOpfield.intstoreOp()Returns the value of thestoreOpfield.VkAttachmentDescriptionstoreOp(int value)Sets the specified value to thestoreOpfield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkAttachmentDescription
public VkAttachmentDescription(java.nio.ByteBuffer container)
Creates aVkAttachmentDescriptioninstance 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).
-
flags
public int flags()
Returns the value of theflagsfield.
-
format
public int format()
Returns the value of theformatfield.
-
samples
public int samples()
Returns the value of thesamplesfield.
-
loadOp
public int loadOp()
Returns the value of theloadOpfield.
-
storeOp
public int storeOp()
Returns the value of thestoreOpfield.
-
stencilLoadOp
public int stencilLoadOp()
Returns the value of thestencilLoadOpfield.
-
stencilStoreOp
public int stencilStoreOp()
Returns the value of thestencilStoreOpfield.
-
initialLayout
public int initialLayout()
Returns the value of theinitialLayoutfield.
-
finalLayout
public int finalLayout()
Returns the value of thefinalLayoutfield.
-
flags
public VkAttachmentDescription flags(int value)
Sets the specified value to theflagsfield.
-
format
public VkAttachmentDescription format(int value)
Sets the specified value to theformatfield.
-
samples
public VkAttachmentDescription samples(int value)
Sets the specified value to thesamplesfield.
-
loadOp
public VkAttachmentDescription loadOp(int value)
Sets the specified value to theloadOpfield.
-
storeOp
public VkAttachmentDescription storeOp(int value)
Sets the specified value to thestoreOpfield.
-
stencilLoadOp
public VkAttachmentDescription stencilLoadOp(int value)
Sets the specified value to thestencilLoadOpfield.
-
stencilStoreOp
public VkAttachmentDescription stencilStoreOp(int value)
Sets the specified value to thestencilStoreOpfield.
-
initialLayout
public VkAttachmentDescription initialLayout(int value)
Sets the specified value to theinitialLayoutfield.
-
finalLayout
public VkAttachmentDescription finalLayout(int value)
Sets the specified value to thefinalLayoutfield.
-
set
public VkAttachmentDescription set(int flags, int format, int samples, int loadOp, int storeOp, int stencilLoadOp, int stencilStoreOp, int initialLayout, int finalLayout)
Initializes this struct with the specified values.
-
nset
public VkAttachmentDescription nset(long struct)
Unsafe version ofset.
-
set
public VkAttachmentDescription set(VkAttachmentDescription src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkAttachmentDescription malloc()
Returns a newVkAttachmentDescriptioninstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkAttachmentDescription calloc()
Returns a newVkAttachmentDescriptioninstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkAttachmentDescription create()
Returns a newVkAttachmentDescriptioninstance allocated withBufferUtils.
-
create
public static VkAttachmentDescription create(long address)
Returns a newVkAttachmentDescriptioninstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkAttachmentDescription.Buffer malloc(int capacity)
Returns a newVkAttachmentDescription.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkAttachmentDescription.Buffer calloc(int capacity)
Returns a newVkAttachmentDescription.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkAttachmentDescription.Buffer create(int capacity)
Returns a newVkAttachmentDescription.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkAttachmentDescription.Buffer create(long address, int capacity)
Create aVkAttachmentDescription.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkAttachmentDescription mallocStack()
Returns a newVkAttachmentDescriptioninstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkAttachmentDescription callocStack()
Returns a newVkAttachmentDescriptioninstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkAttachmentDescription mallocStack(MemoryStack stack)
Returns a newVkAttachmentDescriptioninstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkAttachmentDescription callocStack(MemoryStack stack)
Returns a newVkAttachmentDescriptioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkAttachmentDescription.Buffer mallocStack(int capacity)
Returns a newVkAttachmentDescription.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkAttachmentDescription.Buffer callocStack(int capacity)
Returns a newVkAttachmentDescription.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkAttachmentDescription.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkAttachmentDescription.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkAttachmentDescription.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkAttachmentDescription.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-