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
flags
must be a valid combination ofVkAttachmentDescriptionFlagBits
valuesformat
must be a validVkFormat
valuesamples
must be a validVkSampleCountFlagBits
valueloadOp
must be a validVkAttachmentLoadOp
valuestoreOp
must be a validVkAttachmentStoreOp
valuestencilLoadOp
must be a validVkAttachmentLoadOp
valuestencilStoreOp
must be a validVkAttachmentStoreOp
valueinitialLayout
must be a validVkImageLayout
valuefinalLayout
must be a validVkImageLayout
value
Member documentation
flags
– a bitfield ofVkAttachmentDescriptionFlagBits
describing additional properties of the attachment. One or more of:ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
format
– aVkFormat
value 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_BIT
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_2_BIT
SAMPLE_COUNT_32_BIT
SAMPLE_COUNT_4_BIT
SAMPLE_COUNT_64_BIT
SAMPLE_COUNT_8_BIT
loadOp
– 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_CLEAR
ATTACHMENT_LOAD_OP_DONT_CARE
ATTACHMENT_LOAD_OP_LOAD
storeOp
– 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_CARE
ATTACHMENT_STORE_OP_STORE
stencilLoadOp
– 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 forloadOp
stencilStoreOp
– 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 forstoreOp
initialLayout
– 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 class
VkAttachmentDescription.Buffer
An array ofVkAttachmentDescription
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 aVkAttachmentDescription
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkAttachmentDescription
calloc()
Returns a newVkAttachmentDescription
instance allocated withmemCalloc
.static VkAttachmentDescription.Buffer
calloc(int capacity)
Returns a newVkAttachmentDescription.Buffer
instance allocated withmemCalloc
.static VkAttachmentDescription
callocStack()
Returns a newVkAttachmentDescription
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkAttachmentDescription.Buffer
callocStack(int capacity)
Returns a newVkAttachmentDescription.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkAttachmentDescription.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkAttachmentDescription.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkAttachmentDescription
callocStack(MemoryStack stack)
Returns a newVkAttachmentDescription
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkAttachmentDescription
create()
Returns a newVkAttachmentDescription
instance allocated withBufferUtils
.static VkAttachmentDescription.Buffer
create(int capacity)
Returns a newVkAttachmentDescription.Buffer
instance allocated withBufferUtils
.static VkAttachmentDescription
create(long address)
Returns a newVkAttachmentDescription
instance for the specified memory address ornull
if the address isNULL
.static VkAttachmentDescription.Buffer
create(long address, int capacity)
Create aVkAttachmentDescription.Buffer
instance at the specified memory.int
finalLayout()
Returns the value of thefinalLayout
field.VkAttachmentDescription
finalLayout(int value)
Sets the specified value to thefinalLayout
field.int
flags()
Returns the value of theflags
field.VkAttachmentDescription
flags(int value)
Sets the specified value to theflags
field.int
format()
Returns the value of theformat
field.VkAttachmentDescription
format(int value)
Sets the specified value to theformat
field.int
initialLayout()
Returns the value of theinitialLayout
field.VkAttachmentDescription
initialLayout(int value)
Sets the specified value to theinitialLayout
field.int
loadOp()
Returns the value of theloadOp
field.VkAttachmentDescription
loadOp(int value)
Sets the specified value to theloadOp
field.static VkAttachmentDescription
malloc()
Returns a newVkAttachmentDescription
instance allocated withmemAlloc
.static VkAttachmentDescription.Buffer
malloc(int capacity)
Returns a newVkAttachmentDescription.Buffer
instance allocated withmemAlloc
.static VkAttachmentDescription
mallocStack()
Returns a newVkAttachmentDescription
instance allocated on the thread-localMemoryStack
.static VkAttachmentDescription.Buffer
mallocStack(int capacity)
Returns a newVkAttachmentDescription.Buffer
instance allocated on the thread-localMemoryStack
.static VkAttachmentDescription.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkAttachmentDescription.Buffer
instance allocated on the specifiedMemoryStack
.static VkAttachmentDescription
mallocStack(MemoryStack stack)
Returns a newVkAttachmentDescription
instance allocated on the specifiedMemoryStack
.VkAttachmentDescription
nset(long struct)
Unsafe version ofset
.int
samples()
Returns the value of thesamples
field.VkAttachmentDescription
samples(int value)
Sets the specified value to thesamples
field.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.VkAttachmentDescription
set(VkAttachmentDescription src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
stencilLoadOp()
Returns the value of thestencilLoadOp
field.VkAttachmentDescription
stencilLoadOp(int value)
Sets the specified value to thestencilLoadOp
field.int
stencilStoreOp()
Returns the value of thestencilStoreOp
field.VkAttachmentDescription
stencilStoreOp(int value)
Sets the specified value to thestencilStoreOp
field.int
storeOp()
Returns the value of thestoreOp
field.VkAttachmentDescription
storeOp(int value)
Sets the specified value to thestoreOp
field.-
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 aVkAttachmentDescription
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()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
flags
public int flags()
Returns the value of theflags
field.
-
format
public int format()
Returns the value of theformat
field.
-
samples
public int samples()
Returns the value of thesamples
field.
-
loadOp
public int loadOp()
Returns the value of theloadOp
field.
-
storeOp
public int storeOp()
Returns the value of thestoreOp
field.
-
stencilLoadOp
public int stencilLoadOp()
Returns the value of thestencilLoadOp
field.
-
stencilStoreOp
public int stencilStoreOp()
Returns the value of thestencilStoreOp
field.
-
initialLayout
public int initialLayout()
Returns the value of theinitialLayout
field.
-
finalLayout
public int finalLayout()
Returns the value of thefinalLayout
field.
-
flags
public VkAttachmentDescription flags(int value)
Sets the specified value to theflags
field.
-
format
public VkAttachmentDescription format(int value)
Sets the specified value to theformat
field.
-
samples
public VkAttachmentDescription samples(int value)
Sets the specified value to thesamples
field.
-
loadOp
public VkAttachmentDescription loadOp(int value)
Sets the specified value to theloadOp
field.
-
storeOp
public VkAttachmentDescription storeOp(int value)
Sets the specified value to thestoreOp
field.
-
stencilLoadOp
public VkAttachmentDescription stencilLoadOp(int value)
Sets the specified value to thestencilLoadOp
field.
-
stencilStoreOp
public VkAttachmentDescription stencilStoreOp(int value)
Sets the specified value to thestencilStoreOp
field.
-
initialLayout
public VkAttachmentDescription initialLayout(int value)
Sets the specified value to theinitialLayout
field.
-
finalLayout
public VkAttachmentDescription finalLayout(int value)
Sets the specified value to thefinalLayout
field.
-
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 newVkAttachmentDescription
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkAttachmentDescription calloc()
Returns a newVkAttachmentDescription
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkAttachmentDescription create()
Returns a newVkAttachmentDescription
instance allocated withBufferUtils
.
-
create
public static VkAttachmentDescription create(long address)
Returns a newVkAttachmentDescription
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkAttachmentDescription.Buffer malloc(int capacity)
Returns a newVkAttachmentDescription.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkAttachmentDescription.Buffer calloc(int capacity)
Returns a newVkAttachmentDescription.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkAttachmentDescription.Buffer create(int capacity)
Returns a newVkAttachmentDescription.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkAttachmentDescription.Buffer create(long address, int capacity)
Create aVkAttachmentDescription.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkAttachmentDescription mallocStack()
Returns a newVkAttachmentDescription
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkAttachmentDescription callocStack()
Returns a newVkAttachmentDescription
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkAttachmentDescription mallocStack(MemoryStack stack)
Returns a newVkAttachmentDescription
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkAttachmentDescription callocStack(MemoryStack stack)
Returns a newVkAttachmentDescription
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkAttachmentDescription.Buffer callocStack(int capacity)
Returns a newVkAttachmentDescription.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkAttachmentDescription.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkAttachmentDescription.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-