Class VkRenderPassBeginInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkRenderPassBeginInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkRenderPassBeginInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying render pass begin info.Description
renderArea
is the render area that is affected by the render pass instance. The effects of attachment load, store and multisample resolve operations are restricted to the pixels whose x and y coordinates fall within the render area on all attachments. The render area extends to all layers offramebuffer
. The application must ensure (using scissor if necessary) that all rendering is contained within the render area. The render area must be contained within the framebuffer dimensions.When multiview is enabled, the resolve operation at the end of a subpass applies to all views in the view mask.
Note
There may be a performance cost for using a render area smaller than the framebuffer, unless it matches the render area granularity for the render pass.
Valid Usage
clearValueCount
must be greater than the largest attachment index inrenderPass
that specifies aloadOp
(orstencilLoadOp
, if the attachment has a depth/stencil format) ofATTACHMENT_LOAD_OP_CLEAR
renderPass
must be compatible with therenderPass
member of theVkFramebufferCreateInfo
structure specified when creatingframebuffer
.- If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that did not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, and thepNext
chain includes an instance ofVkRenderPassAttachmentBeginInfoKHR
, itsattachmentCount
must be zero - If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, theattachmentCount
of an instance ofVkRenderPassAttachmentBeginInfoKHR
included in thepNext
chain must be equal to the value ofVkFramebufferAttachmentsCreateInfoKHR
::attachmentImageInfoCount
used to createframebuffer
- If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, each element of thepAttachments
member of an instance ofVkRenderPassAttachmentBeginInfoKHR
included in thepNext
chain must have been created on the sameVkDevice
asframebuffer
andrenderPass
- If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, each element of thepAttachments
member of an instance ofVkRenderPassAttachmentBeginInfoKHR
included in thepNext
chain must be aVkImageView
of an image created with a value ofVkImageCreateInfo
::flags
equal to theflags
member of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR
::pAttachments
used to createframebuffer
- If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, each element of thepAttachments
member of an instance ofVkRenderPassAttachmentBeginInfoKHR
included in thepNext
chain must be aVkImageView
of an image created with a value ofVkImageCreateInfo
::usage
equal to theusage
member of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR
::pAttachments
used to createframebuffer
- If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, each element of thepAttachments
member of an instance ofVkRenderPassAttachmentBeginInfoKHR
included in thepNext
chain must be aVkImageView
with a width equal to thewidth
member of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR
::pAttachments
used to createframebuffer
- If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, each element of thepAttachments
member of an instance ofVkRenderPassAttachmentBeginInfoKHR
included in thepNext
chain must be aVkImageView
with a height equal to theheight
member of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR
::pAttachments
used to createframebuffer
- If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, each element of thepAttachments
member of an instance ofVkRenderPassAttachmentBeginInfoKHR
included in thepNext
chain must be aVkImageView
of an image created with a value ofVkImageViewCreateInfo
::subresourceRange
.layerCount
equal to thelayerCount
member of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR
::pAttachments
used to createframebuffer
- If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, each element of thepAttachments
member of an instance ofVkRenderPassAttachmentBeginInfoKHR
included in thepNext
chain must be aVkImageView
of an image created with a value ofVkImageFormatListCreateInfoKHR
::viewFormatCount
equal to theviewFormatCount
member of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR
::pAttachments
used to createframebuffer
- If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, each element of thepAttachments
member of an instance ofVkRenderPassAttachmentBeginInfoKHR
included in thepNext
chain must be aVkImageView
of an image created with a set of elements inVkImageFormatListCreateInfoKHR
::pViewFormats
equal to the set of elements in thepViewFormats
member of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR
::pAttachments
used to createframebuffer
- If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, each element of thepAttachments
member of an instance ofVkRenderPassAttachmentBeginInfoKHR
included in thepNext
chain must be aVkImageView
of an image created with a value ofVkImageViewCreateInfo
::format
equal to the corresponding value ofVkAttachmentDescription
::format
inrenderPass
- If
framebuffer
was created with aVkFramebufferCreateInfo
::flags
value that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, each element of thepAttachments
member of an instance ofVkRenderPassAttachmentBeginInfoKHR
included in thepNext
chain must be aVkImageView
of an image created with a value ofVkImageCreateInfo
::samples
equal to the corresponding value ofVkAttachmentDescription
::samples
inrenderPass
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofVkDeviceGroupRenderPassBeginInfo
,VkRenderPassAttachmentBeginInfoKHR
, orVkRenderPassSampleLocationsBeginInfoEXT
- Each
sType
member in thepNext
chain must be unique renderPass
must be a validVkRenderPass
handleframebuffer
must be a validVkFramebuffer
handle- If
clearValueCount
is not 0,pClearValues
must be a valid pointer to an array ofclearValueCount
VkClearValue
unions - Both of
framebuffer
, andrenderPass
must have been created, allocated, or retrieved from the sameVkDevice
See Also
VkClearValue
,VkRect2D
,CmdBeginRenderPass
,CmdBeginRenderPass2KHR
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.renderPass
– the render pass to begin an instance of.framebuffer
– the framebuffer containing the attachments that are used with the render pass.renderArea
– the render area that is affected by the render pass instance, and is described in more detail below.clearValueCount
– the number of elements inpClearValues
.pClearValues
– an array ofVkClearValue
structures that contains clear values for each attachment, if the attachment uses aloadOp
value ofATTACHMENT_LOAD_OP_CLEAR
or if the attachment has a depth/stencil format and uses astencilLoadOp
value ofATTACHMENT_LOAD_OP_CLEAR
. The array is indexed by attachment number. Only elements corresponding to cleared attachments are used. Other elements ofpClearValues
are ignored.
Layout
struct VkRenderPassBeginInfo { VkStructureType sType; void const * pNext; VkRenderPass renderPass; VkFramebuffer framebuffer;
VkRect2D
renderArea; uint32_t clearValueCount;VkClearValue
const * pClearValues; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkRenderPassBeginInfo.Buffer
An array ofVkRenderPassBeginInfo
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CLEARVALUECOUNT
FRAMEBUFFER
PCLEARVALUES
PNEXT
RENDERAREA
RENDERPASSThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkRenderPassBeginInfo(java.nio.ByteBuffer container)
Creates aVkRenderPassBeginInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkRenderPassBeginInfo
calloc()
Returns a newVkRenderPassBeginInfo
instance allocated withmemCalloc
.static VkRenderPassBeginInfo.Buffer
calloc(int capacity)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated withmemCalloc
.static VkRenderPassBeginInfo
callocStack()
Returns a newVkRenderPassBeginInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkRenderPassBeginInfo.Buffer
callocStack(int capacity)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkRenderPassBeginInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkRenderPassBeginInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassBeginInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
clearValueCount()
Returns the value of theclearValueCount
field.static VkRenderPassBeginInfo
create()
Returns a newVkRenderPassBeginInfo
instance allocated withBufferUtils
.static VkRenderPassBeginInfo.Buffer
create(int capacity)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated withBufferUtils
.static VkRenderPassBeginInfo
create(long address)
Returns a newVkRenderPassBeginInfo
instance for the specified memory address.static VkRenderPassBeginInfo.Buffer
create(long address, int capacity)
Create aVkRenderPassBeginInfo.Buffer
instance at the specified memory.static VkRenderPassBeginInfo
createSafe(long address)
static VkRenderPassBeginInfo.Buffer
createSafe(long address, int capacity)
long
framebuffer()
Returns the value of theframebuffer
field.VkRenderPassBeginInfo
framebuffer(long value)
Sets the specified value to theframebuffer
field.static VkRenderPassBeginInfo
malloc()
Returns a newVkRenderPassBeginInfo
instance allocated withmemAlloc
.static VkRenderPassBeginInfo.Buffer
malloc(int capacity)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated withmemAlloc
.static VkRenderPassBeginInfo
mallocStack()
Returns a newVkRenderPassBeginInfo
instance allocated on the thread-localMemoryStack
.static VkRenderPassBeginInfo.Buffer
mallocStack(int capacity)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkRenderPassBeginInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkRenderPassBeginInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassBeginInfo
instance allocated on the specifiedMemoryStack
.static int
nclearValueCount(long struct)
Unsafe version ofclearValueCount()
.static void
nclearValueCount(long struct, int value)
Sets the specified value to theclearValueCount
field of the specifiedstruct
.static long
nframebuffer(long struct)
Unsafe version offramebuffer()
.static void
nframebuffer(long struct, long value)
Unsafe version offramebuffer
.static VkClearValue.Buffer
npClearValues(long struct)
Unsafe version ofpClearValues()
.static void
npClearValues(long struct, VkClearValue.Buffer value)
Unsafe version ofpClearValues
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static VkRect2D
nrenderArea(long struct)
Unsafe version ofrenderArea()
.static void
nrenderArea(long struct, VkRect2D value)
Unsafe version ofrenderArea
.static long
nrenderPass(long struct)
Unsafe version ofrenderPass()
.static void
nrenderPass(long struct, long value)
Unsafe version ofrenderPass
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.VkClearValue.Buffer
pClearValues()
Returns aVkClearValue.Buffer
view of the struct array pointed to by thepClearValues
field.VkRenderPassBeginInfo
pClearValues(VkClearValue.Buffer value)
Sets the address of the specifiedVkClearValue.Buffer
to thepClearValues
field.long
pNext()
Returns the value of thepNext
field.VkRenderPassBeginInfo
pNext(long value)
Sets the specified value to thepNext
field.VkRect2D
renderArea()
Returns aVkRect2D
view of therenderArea
field.VkRenderPassBeginInfo
renderArea(java.util.function.Consumer<VkRect2D> consumer)
Passes therenderArea
field to the specifiedConsumer
.VkRenderPassBeginInfo
renderArea(VkRect2D value)
Copies the specifiedVkRect2D
to therenderArea
field.long
renderPass()
Returns the value of therenderPass
field.VkRenderPassBeginInfo
renderPass(long value)
Sets the specified value to therenderPass
field.VkRenderPassBeginInfo
set(int sType, long pNext, long renderPass, long framebuffer, VkRect2D renderArea, VkClearValue.Buffer pClearValues)
Initializes this struct with the specified values.VkRenderPassBeginInfo
set(VkRenderPassBeginInfo src)
Copies the specified struct data to this struct.int
sizeof()
int
sType()
Returns the value of thesType
field.VkRenderPassBeginInfo
sType(int value)
Sets the specified value to thesType
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
VkRenderPassBeginInfo
public VkRenderPassBeginInfo(java.nio.ByteBuffer container)
Creates aVkRenderPassBeginInfo
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
renderPass
public long renderPass()
Returns the value of therenderPass
field.
-
framebuffer
public long framebuffer()
Returns the value of theframebuffer
field.
-
clearValueCount
public int clearValueCount()
Returns the value of theclearValueCount
field.
-
pClearValues
@Nullable public VkClearValue.Buffer pClearValues()
Returns aVkClearValue.Buffer
view of the struct array pointed to by thepClearValues
field.
-
sType
public VkRenderPassBeginInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkRenderPassBeginInfo pNext(long value)
Sets the specified value to thepNext
field.
-
renderPass
public VkRenderPassBeginInfo renderPass(long value)
Sets the specified value to therenderPass
field.
-
framebuffer
public VkRenderPassBeginInfo framebuffer(long value)
Sets the specified value to theframebuffer
field.
-
renderArea
public VkRenderPassBeginInfo renderArea(VkRect2D value)
Copies the specifiedVkRect2D
to therenderArea
field.
-
renderArea
public VkRenderPassBeginInfo renderArea(java.util.function.Consumer<VkRect2D> consumer)
Passes therenderArea
field to the specifiedConsumer
.
-
pClearValues
public VkRenderPassBeginInfo pClearValues(@Nullable VkClearValue.Buffer value)
Sets the address of the specifiedVkClearValue.Buffer
to thepClearValues
field.
-
set
public VkRenderPassBeginInfo set(int sType, long pNext, long renderPass, long framebuffer, VkRect2D renderArea, @Nullable VkClearValue.Buffer pClearValues)
Initializes this struct with the specified values.
-
set
public VkRenderPassBeginInfo set(VkRenderPassBeginInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkRenderPassBeginInfo malloc()
Returns a newVkRenderPassBeginInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkRenderPassBeginInfo calloc()
Returns a newVkRenderPassBeginInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkRenderPassBeginInfo create()
Returns a newVkRenderPassBeginInfo
instance allocated withBufferUtils
.
-
create
public static VkRenderPassBeginInfo create(long address)
Returns a newVkRenderPassBeginInfo
instance for the specified memory address.
-
createSafe
@Nullable public static VkRenderPassBeginInfo createSafe(long address)
-
malloc
public static VkRenderPassBeginInfo.Buffer malloc(int capacity)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkRenderPassBeginInfo.Buffer calloc(int capacity)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkRenderPassBeginInfo.Buffer create(int capacity)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkRenderPassBeginInfo.Buffer create(long address, int capacity)
Create aVkRenderPassBeginInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkRenderPassBeginInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkRenderPassBeginInfo mallocStack()
Returns a newVkRenderPassBeginInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkRenderPassBeginInfo callocStack()
Returns a newVkRenderPassBeginInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkRenderPassBeginInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassBeginInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkRenderPassBeginInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassBeginInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkRenderPassBeginInfo.Buffer mallocStack(int capacity)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkRenderPassBeginInfo.Buffer callocStack(int capacity)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkRenderPassBeginInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkRenderPassBeginInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassBeginInfo.Buffer
instance allocated on the specifiedMemoryStack
and 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()
.
-
nrenderPass
public static long nrenderPass(long struct)
Unsafe version ofrenderPass()
.
-
nframebuffer
public static long nframebuffer(long struct)
Unsafe version offramebuffer()
.
-
nrenderArea
public static VkRect2D nrenderArea(long struct)
Unsafe version ofrenderArea()
.
-
nclearValueCount
public static int nclearValueCount(long struct)
Unsafe version ofclearValueCount()
.
-
npClearValues
@Nullable public static VkClearValue.Buffer npClearValues(long struct)
Unsafe version ofpClearValues()
.
-
nsType
public static void nsType(long struct, int value)
Unsafe version ofsType
.
-
npNext
public static void npNext(long struct, long value)
Unsafe version ofpNext
.
-
nrenderPass
public static void nrenderPass(long struct, long value)
Unsafe version ofrenderPass
.
-
nframebuffer
public static void nframebuffer(long struct, long value)
Unsafe version offramebuffer
.
-
nrenderArea
public static void nrenderArea(long struct, VkRect2D value)
Unsafe version ofrenderArea
.
-
nclearValueCount
public static void nclearValueCount(long struct, int value)
Sets the specified value to theclearValueCount
field of the specifiedstruct
.
-
npClearValues
public static void npClearValues(long struct, @Nullable VkClearValue.Buffer value)
Unsafe version ofpClearValues
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-