Class VkAttachmentDescription2
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkAttachmentDescription2
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkAttachmentDescription2KHR
public class VkAttachmentDescription2 extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying an attachment description.Description
Parameters defined by this structure with the same name as those in
VkAttachmentDescriptionhave the identical effect to those parameters.If the
separateDepthStencilLayoutsfeature is enabled, andformatis a depth/stencil format,initialLayoutandfinalLayoutcan be set to a layout that only specifies the layout of the depth aspect.If the
pNextchain includes aVkAttachmentDescriptionStencilLayoutstructure, then thestencilInitialLayoutandstencilFinalLayoutmembers specify the initial and final layouts of the stencil aspect of a depth/stencil format, andinitialLayoutandfinalLayoutonly apply to the depth aspect. For depth-only formats, theVkAttachmentDescriptionStencilLayoutstructure is ignored. For stencil-only formats, the initial and final layouts of the stencil aspect are taken from theVkAttachmentDescriptionStencilLayoutstructure if present, orinitialLayoutandfinalLayoutif not present.If
formatis a depth/stencil format, and eitherinitialLayoutorfinalLayoutdoes not specify a layout for the stencil aspect, then the application must specify the initial and final layouts of the stencil aspect by including aVkAttachmentDescriptionStencilLayoutstructure in thepNextchain.Valid Usage
finalLayoutmust not beIMAGE_LAYOUT_UNDEFINEDorIMAGE_LAYOUT_PREINITIALIZED- If
formatis a color format,initialLayoutmust not beIMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, orIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL - If
formatis a depth/stencil format,initialLayoutmust not beIMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL - If
formatis a color format,finalLayoutmust not beIMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, orIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL - If
formatis a depth/stencil format,finalLayoutmust not beIMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL - If the
separateDepthStencilLayoutsfeature is not enabled,initialLayoutmust not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL - If the
separateDepthStencilLayoutsfeature is not enabled,finalLayoutmust not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL - If
formatis a color format,initialLayoutmust not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL - If
formatis a color format,finalLayoutmust not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL - If
formatis a depth/stencil format which includes both depth and stencil aspects, andinitialLayoutisIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, thepNextchain must include aVkAttachmentDescriptionStencilLayoutstructure - If
formatis a depth/stencil format which includes both depth and stencil aspects, andfinalLayoutisIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, thepNextchain must include aVkAttachmentDescriptionStencilLayoutstructure - If
formatis a depth/stencil format which includes only the depth aspect,initialLayoutmust not beIMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL - If
formatis a depth/stencil format which includes only the depth aspect,finalLayoutmust not beIMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL - If
formatis a depth/stencil format which includes only the stencil aspect,initialLayoutmust not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL - If
formatis a depth/stencil format which includes only the stencil aspect,finalLayoutmust not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2pNextmust beNULLor a pointer to a valid instance ofVkAttachmentDescriptionStencilLayout- The
sTypevalue of each struct in thepNextchain must be unique 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
See Also
Layout
struct VkAttachmentDescription2 { VkStructureTypesType(); void const *pNext(); VkAttachmentDescriptionFlagsflags(); VkFormatformat(); VkSampleCountFlagBitssamples(); VkAttachmentLoadOploadOp(); VkAttachmentStoreOpstoreOp(); VkAttachmentLoadOpstencilLoadOp(); VkAttachmentStoreOpstencilStoreOp(); VkImageLayoutinitialLayout(); VkImageLayoutfinalLayout(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkAttachmentDescription2.BufferAn array ofVkAttachmentDescription2structs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intFINALLAYOUT
FLAGS
FORMAT
INITIALLAYOUT
LOADOP
PNEXT
SAMPLESThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTENCILLOADOP
STENCILSTOREOP
STOREOP
STYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkAttachmentDescription2(java.nio.ByteBuffer container)Creates aVkAttachmentDescription2instance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkAttachmentDescription2calloc()Returns a newVkAttachmentDescription2instance allocated withmemCalloc.static VkAttachmentDescription2.Buffercalloc(int capacity)Returns a newVkAttachmentDescription2.Bufferinstance allocated withmemCalloc.static VkAttachmentDescription2.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkAttachmentDescription2.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAttachmentDescription2calloc(org.lwjgl.system.MemoryStack stack)Returns a newVkAttachmentDescription2instance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAttachmentDescription2create()Returns a newVkAttachmentDescription2instance allocated withBufferUtils.static VkAttachmentDescription2.Buffercreate(int capacity)Returns a newVkAttachmentDescription2.Bufferinstance allocated withBufferUtils.static VkAttachmentDescription2create(long address)Returns a newVkAttachmentDescription2instance for the specified memory address.static VkAttachmentDescription2.Buffercreate(long address, int capacity)Create aVkAttachmentDescription2.Bufferinstance at the specified memory.static VkAttachmentDescription2createSafe(long address)static VkAttachmentDescription2.BuffercreateSafe(long address, int capacity)intfinalLayout()the layout the attachment image subresource will be transitioned to when a render pass instance ends.VkAttachmentDescription2finalLayout(int value)Sets the specified value to thefinalLayout()field.intflags()a bitmask ofVkAttachmentDescriptionFlagBitsspecifying additional properties of the attachment.VkAttachmentDescription2flags(int value)Sets the specified value to theflags()field.intformat()aVkFormatvalue specifying the format of the image that will be used for the attachment.VkAttachmentDescription2format(int value)Sets the specified value to theformat()field.intinitialLayout()the layout the attachment image subresource will be in when a render pass instance begins.VkAttachmentDescription2initialLayout(int value)Sets the specified value to theinitialLayout()field.intloadOp()aVkAttachmentLoadOpvalue specifying how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used.VkAttachmentDescription2loadOp(int value)Sets the specified value to theloadOp()field.static VkAttachmentDescription2malloc()Returns a newVkAttachmentDescription2instance allocated withmemAlloc.static VkAttachmentDescription2.Buffermalloc(int capacity)Returns a newVkAttachmentDescription2.Bufferinstance allocated withmemAlloc.static VkAttachmentDescription2.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkAttachmentDescription2.Bufferinstance allocated on the specifiedMemoryStack.static VkAttachmentDescription2malloc(org.lwjgl.system.MemoryStack stack)Returns a newVkAttachmentDescription2instance allocated on the specifiedMemoryStack.static intnfinalLayout(long struct)Unsafe version offinalLayout().static voidnfinalLayout(long struct, int value)Unsafe version offinalLayout.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static intnformat(long struct)Unsafe version offormat().static voidnformat(long struct, int value)Unsafe version offormat.static intninitialLayout(long struct)Unsafe version ofinitialLayout().static voidninitialLayout(long struct, int value)Unsafe version ofinitialLayout.static intnloadOp(long struct)Unsafe version ofloadOp().static voidnloadOp(long struct, int value)Unsafe version ofloadOp.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static intnsamples(long struct)Unsafe version ofsamples().static voidnsamples(long struct, int value)Unsafe version ofsamples.static intnstencilLoadOp(long struct)Unsafe version ofstencilLoadOp().static voidnstencilLoadOp(long struct, int value)Unsafe version ofstencilLoadOp.static intnstencilStoreOp(long struct)Unsafe version ofstencilStoreOp().static voidnstencilStoreOp(long struct, int value)Unsafe version ofstencilStoreOp.static intnstoreOp(long struct)Unsafe version ofstoreOp().static voidnstoreOp(long struct, int value)Unsafe version ofstoreOp.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.longpNext()NULLor a pointer to a structure extending this structure.VkAttachmentDescription2pNext(long value)Sets the specified value to thepNext()field.VkAttachmentDescription2pNext(VkAttachmentDescriptionStencilLayout value)Prepends the specifiedVkAttachmentDescriptionStencilLayoutvalue to thepNextchain.VkAttachmentDescription2pNext(VkAttachmentDescriptionStencilLayoutKHR value)Prepends the specifiedVkAttachmentDescriptionStencilLayoutKHRvalue to thepNextchain.intsamples()aVkSampleCountFlagBitsvalue specifying the number of samples of the image.VkAttachmentDescription2samples(int value)Sets the specified value to thesamples()field.VkAttachmentDescription2set(int sType, long pNext, 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.VkAttachmentDescription2set(VkAttachmentDescription2 src)Copies the specified struct data to this struct.intsizeof()intstencilLoadOp()aVkAttachmentLoadOpvalue specifying how the contents of stencil components of the attachment are treated at the beginning of the subpass where it is first used.VkAttachmentDescription2stencilLoadOp(int value)Sets the specified value to thestencilLoadOp()field.intstencilStoreOp()aVkAttachmentStoreOpvalue specifying how the contents of stencil components of the attachment are treated at the end of the last subpass where it is used.VkAttachmentDescription2stencilStoreOp(int value)Sets the specified value to thestencilStoreOp()field.intstoreOp()aVkAttachmentStoreOpvalue specifying how the contents of color and depth components of the attachment are treated at the end of the subpass where it is last used.VkAttachmentDescription2storeOp(int value)Sets the specified value to thestoreOp()field.intsType()the type of this structure.VkAttachmentDescription2sType(int value)Sets the specified value to thesType()field.VkAttachmentDescription2sType$Default()Sets theSTRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2value to thesType()field.
-
-
-
Constructor Detail
-
VkAttachmentDescription2
public VkAttachmentDescription2(java.nio.ByteBuffer container)
Creates aVkAttachmentDescription2instance 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
-
sType
public int sType()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
flags
public int flags()
a bitmask ofVkAttachmentDescriptionFlagBitsspecifying additional properties of the attachment.
-
format
public int format()
aVkFormatvalue specifying the format of the image that will be used for the attachment.
-
samples
public int samples()
aVkSampleCountFlagBitsvalue specifying the number of samples of the image.
-
loadOp
public int loadOp()
aVkAttachmentLoadOpvalue specifying how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used.
-
storeOp
public int storeOp()
aVkAttachmentStoreOpvalue specifying how the contents of color and depth components of the attachment are treated at the end of the subpass where it is last used.
-
stencilLoadOp
public int stencilLoadOp()
aVkAttachmentLoadOpvalue specifying how the contents of stencil components of the attachment are treated at the beginning of the subpass where it is first used.
-
stencilStoreOp
public int stencilStoreOp()
aVkAttachmentStoreOpvalue specifying how the contents of stencil components of the attachment are treated at the end of the last subpass where it is used.
-
initialLayout
public int initialLayout()
the layout the attachment image subresource will be in when a render pass instance begins.
-
finalLayout
public int finalLayout()
the layout the attachment image subresource will be transitioned to when a render pass instance ends.
-
sType
public VkAttachmentDescription2 sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkAttachmentDescription2 sType$Default()
Sets theSTRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2value to thesType()field.
-
pNext
public VkAttachmentDescription2 pNext(long value)
Sets the specified value to thepNext()field.
-
pNext
public VkAttachmentDescription2 pNext(VkAttachmentDescriptionStencilLayout value)
Prepends the specifiedVkAttachmentDescriptionStencilLayoutvalue to thepNextchain.
-
pNext
public VkAttachmentDescription2 pNext(VkAttachmentDescriptionStencilLayoutKHR value)
Prepends the specifiedVkAttachmentDescriptionStencilLayoutKHRvalue to thepNextchain.
-
flags
public VkAttachmentDescription2 flags(int value)
Sets the specified value to theflags()field.
-
format
public VkAttachmentDescription2 format(int value)
Sets the specified value to theformat()field.
-
samples
public VkAttachmentDescription2 samples(int value)
Sets the specified value to thesamples()field.
-
loadOp
public VkAttachmentDescription2 loadOp(int value)
Sets the specified value to theloadOp()field.
-
storeOp
public VkAttachmentDescription2 storeOp(int value)
Sets the specified value to thestoreOp()field.
-
stencilLoadOp
public VkAttachmentDescription2 stencilLoadOp(int value)
Sets the specified value to thestencilLoadOp()field.
-
stencilStoreOp
public VkAttachmentDescription2 stencilStoreOp(int value)
Sets the specified value to thestencilStoreOp()field.
-
initialLayout
public VkAttachmentDescription2 initialLayout(int value)
Sets the specified value to theinitialLayout()field.
-
finalLayout
public VkAttachmentDescription2 finalLayout(int value)
Sets the specified value to thefinalLayout()field.
-
set
public VkAttachmentDescription2 set(int sType, long pNext, 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.
-
set
public VkAttachmentDescription2 set(VkAttachmentDescription2 src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkAttachmentDescription2 malloc()
Returns a newVkAttachmentDescription2instance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkAttachmentDescription2 calloc()
Returns a newVkAttachmentDescription2instance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkAttachmentDescription2 create()
Returns a newVkAttachmentDescription2instance allocated withBufferUtils.
-
create
public static VkAttachmentDescription2 create(long address)
Returns a newVkAttachmentDescription2instance for the specified memory address.
-
createSafe
@Nullable public static VkAttachmentDescription2 createSafe(long address)
-
malloc
public static VkAttachmentDescription2.Buffer malloc(int capacity)
Returns a newVkAttachmentDescription2.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkAttachmentDescription2.Buffer calloc(int capacity)
Returns a newVkAttachmentDescription2.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkAttachmentDescription2.Buffer create(int capacity)
Returns a newVkAttachmentDescription2.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkAttachmentDescription2.Buffer create(long address, int capacity)
Create aVkAttachmentDescription2.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkAttachmentDescription2.Buffer createSafe(long address, int capacity)
-
malloc
public static VkAttachmentDescription2 malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentDescription2instance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkAttachmentDescription2 calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentDescription2instance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkAttachmentDescription2.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentDescription2.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkAttachmentDescription2.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentDescription2.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType().
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext().
-
nflags
public static int nflags(long struct)
Unsafe version offlags().
-
nformat
public static int nformat(long struct)
Unsafe version offormat().
-
nsamples
public static int nsamples(long struct)
Unsafe version ofsamples().
-
nloadOp
public static int nloadOp(long struct)
Unsafe version ofloadOp().
-
nstoreOp
public static int nstoreOp(long struct)
Unsafe version ofstoreOp().
-
nstencilLoadOp
public static int nstencilLoadOp(long struct)
Unsafe version ofstencilLoadOp().
-
nstencilStoreOp
public static int nstencilStoreOp(long struct)
Unsafe version ofstencilStoreOp().
-
ninitialLayout
public static int ninitialLayout(long struct)
Unsafe version ofinitialLayout().
-
nfinalLayout
public static int nfinalLayout(long struct)
Unsafe version offinalLayout().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nflags
public static void nflags(long struct, int value)Unsafe version offlags.
-
nformat
public static void nformat(long struct, int value)Unsafe version offormat.
-
nsamples
public static void nsamples(long struct, int value)Unsafe version ofsamples.
-
nloadOp
public static void nloadOp(long struct, int value)Unsafe version ofloadOp.
-
nstoreOp
public static void nstoreOp(long struct, int value)Unsafe version ofstoreOp.
-
nstencilLoadOp
public static void nstencilLoadOp(long struct, int value)Unsafe version ofstencilLoadOp.
-
nstencilStoreOp
public static void nstencilStoreOp(long struct, int value)Unsafe version ofstencilStoreOp.
-
ninitialLayout
public static void ninitialLayout(long struct, int value)Unsafe version ofinitialLayout.
-
nfinalLayout
public static void nfinalLayout(long struct, int value)Unsafe version offinalLayout.
-
-