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.NativeResourceStructure specifying render pass begin info.Description
renderAreais 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
clearValueCountmust be greater than the largest attachment index inrenderPassthat specifies aloadOp(orstencilLoadOp, if the attachment has a depth/stencil format) ofATTACHMENT_LOAD_OP_CLEARrenderPassmust be compatible with therenderPassmember of theVkFramebufferCreateInfostructure specified when creatingframebuffer.- If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that did not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, and thepNextchain includes an instance ofVkRenderPassAttachmentBeginInfoKHR, itsattachmentCountmust be zero - If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, theattachmentCountof an instance ofVkRenderPassAttachmentBeginInfoKHRincluded in thepNextchain must be equal to the value ofVkFramebufferAttachmentsCreateInfoKHR::attachmentImageInfoCountused to createframebuffer - If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of thepAttachmentsmember of an instance ofVkRenderPassAttachmentBeginInfoKHRincluded in thepNextchain must have been created on the sameVkDeviceasframebufferandrenderPass - If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of thepAttachmentsmember of an instance ofVkRenderPassAttachmentBeginInfoKHRincluded in thepNextchain must be aVkImageViewof an image created with a value ofVkImageCreateInfo::flagsequal to theflagsmember of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR::pAttachmentsused to createframebuffer - If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of thepAttachmentsmember of an instance ofVkRenderPassAttachmentBeginInfoKHRincluded in thepNextchain must be aVkImageViewof an image created with a value ofVkImageCreateInfo::usageequal to theusagemember of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR::pAttachmentsused to createframebuffer - If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of thepAttachmentsmember of an instance ofVkRenderPassAttachmentBeginInfoKHRincluded in thepNextchain must be aVkImageViewwith a width equal to thewidthmember of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR::pAttachmentsused to createframebuffer - If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of thepAttachmentsmember of an instance ofVkRenderPassAttachmentBeginInfoKHRincluded in thepNextchain must be aVkImageViewwith a height equal to theheightmember of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR::pAttachmentsused to createframebuffer - If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of thepAttachmentsmember of an instance ofVkRenderPassAttachmentBeginInfoKHRincluded in thepNextchain must be aVkImageViewof an image created with a value ofVkImageViewCreateInfo::subresourceRange.layerCountequal to thelayerCountmember of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR::pAttachmentsused to createframebuffer - If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of thepAttachmentsmember of an instance ofVkRenderPassAttachmentBeginInfoKHRincluded in thepNextchain must be aVkImageViewof an image created with a value ofVkImageFormatListCreateInfoKHR::viewFormatCountequal to theviewFormatCountmember of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR::pAttachmentsused to createframebuffer - If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of thepAttachmentsmember of an instance ofVkRenderPassAttachmentBeginInfoKHRincluded in thepNextchain must be aVkImageViewof an image created with a set of elements inVkImageFormatListCreateInfoKHR::pViewFormatsequal to the set of elements in thepViewFormatsmember of the corresponding element ofVkFramebufferAttachmentsCreateInfoKHR::pAttachmentsused to createframebuffer - If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of thepAttachmentsmember of an instance ofVkRenderPassAttachmentBeginInfoKHRincluded in thepNextchain must be aVkImageViewof an image created with a value ofVkImageViewCreateInfo::formatequal to the corresponding value ofVkAttachmentDescription::formatinrenderPass - If
framebufferwas created with aVkFramebufferCreateInfo::flagsvalue that includedFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of thepAttachmentsmember of an instance ofVkRenderPassAttachmentBeginInfoKHRincluded in thepNextchain must be aVkImageViewof an image created with a value ofVkImageCreateInfo::samplesequal to the corresponding value ofVkAttachmentDescription::samplesinrenderPass
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkDeviceGroupRenderPassBeginInfo,VkRenderPassAttachmentBeginInfoKHR, orVkRenderPassSampleLocationsBeginInfoEXT - Each
sTypemember in thepNextchain must be unique renderPassmust be a validVkRenderPasshandleframebuffermust be a validVkFramebufferhandle- If
clearValueCountis not 0,pClearValuesmust be a valid pointer to an array ofclearValueCountVkClearValueunions - Both of
framebuffer, andrenderPassmust have been created, allocated, or retrieved from the sameVkDevice
See Also
VkClearValue,VkRect2D,CmdBeginRenderPass,CmdBeginRenderPass2KHRMember documentation
sType– the type of this structure.pNext–NULLor 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 ofVkClearValuestructures that contains clear values for each attachment, if the attachment uses aloadOpvalue ofATTACHMENT_LOAD_OP_CLEARor if the attachment has a depth/stencil format and uses astencilLoadOpvalue ofATTACHMENT_LOAD_OP_CLEAR. The array is indexed by attachment number. Only elements corresponding to cleared attachments are used. Other elements ofpClearValuesare ignored.
Layout
struct VkRenderPassBeginInfo { VkStructureType sType; void const * pNext; VkRenderPass renderPass; VkFramebuffer framebuffer;VkRect2DrenderArea; uint32_t clearValueCount;VkClearValueconst * pClearValues; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkRenderPassBeginInfo.BufferAn array ofVkRenderPassBeginInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCLEARVALUECOUNT
FRAMEBUFFER
PCLEARVALUES
PNEXT
RENDERAREA
RENDERPASSThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkRenderPassBeginInfo(java.nio.ByteBuffer container)Creates aVkRenderPassBeginInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkRenderPassBeginInfocalloc()Returns a newVkRenderPassBeginInfoinstance allocated withmemCalloc.static VkRenderPassBeginInfo.Buffercalloc(int capacity)Returns a newVkRenderPassBeginInfo.Bufferinstance allocated withmemCalloc.static VkRenderPassBeginInfocallocStack()Returns a newVkRenderPassBeginInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkRenderPassBeginInfo.BuffercallocStack(int capacity)Returns a newVkRenderPassBeginInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkRenderPassBeginInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkRenderPassBeginInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkRenderPassBeginInfocallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkRenderPassBeginInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intclearValueCount()Returns the value of theclearValueCountfield.static VkRenderPassBeginInfocreate()Returns a newVkRenderPassBeginInfoinstance allocated withBufferUtils.static VkRenderPassBeginInfo.Buffercreate(int capacity)Returns a newVkRenderPassBeginInfo.Bufferinstance allocated withBufferUtils.static VkRenderPassBeginInfocreate(long address)Returns a newVkRenderPassBeginInfoinstance for the specified memory address.static VkRenderPassBeginInfo.Buffercreate(long address, int capacity)Create aVkRenderPassBeginInfo.Bufferinstance at the specified memory.static VkRenderPassBeginInfocreateSafe(long address)static VkRenderPassBeginInfo.BuffercreateSafe(long address, int capacity)longframebuffer()Returns the value of theframebufferfield.VkRenderPassBeginInfoframebuffer(long value)Sets the specified value to theframebufferfield.static VkRenderPassBeginInfomalloc()Returns a newVkRenderPassBeginInfoinstance allocated withmemAlloc.static VkRenderPassBeginInfo.Buffermalloc(int capacity)Returns a newVkRenderPassBeginInfo.Bufferinstance allocated withmemAlloc.static VkRenderPassBeginInfomallocStack()Returns a newVkRenderPassBeginInfoinstance allocated on the thread-localMemoryStack.static VkRenderPassBeginInfo.BuffermallocStack(int capacity)Returns a newVkRenderPassBeginInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkRenderPassBeginInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkRenderPassBeginInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkRenderPassBeginInfomallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkRenderPassBeginInfoinstance allocated on the specifiedMemoryStack.static intnclearValueCount(long struct)Unsafe version ofclearValueCount().static voidnclearValueCount(long struct, int value)Sets the specified value to theclearValueCountfield of the specifiedstruct.static longnframebuffer(long struct)Unsafe version offramebuffer().static voidnframebuffer(long struct, long value)Unsafe version offramebuffer.static VkClearValue.BuffernpClearValues(long struct)Unsafe version ofpClearValues().static voidnpClearValues(long struct, VkClearValue.Buffer value)Unsafe version ofpClearValues.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static VkRect2DnrenderArea(long struct)Unsafe version ofrenderArea().static voidnrenderArea(long struct, VkRect2D value)Unsafe version ofrenderArea.static longnrenderPass(long struct)Unsafe version ofrenderPass().static voidnrenderPass(long struct, long value)Unsafe version ofrenderPass.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.VkClearValue.BufferpClearValues()Returns aVkClearValue.Bufferview of the struct array pointed to by thepClearValuesfield.VkRenderPassBeginInfopClearValues(VkClearValue.Buffer value)Sets the address of the specifiedVkClearValue.Bufferto thepClearValuesfield.longpNext()Returns the value of thepNextfield.VkRenderPassBeginInfopNext(long value)Sets the specified value to thepNextfield.VkRect2DrenderArea()Returns aVkRect2Dview of therenderAreafield.VkRenderPassBeginInforenderArea(java.util.function.Consumer<VkRect2D> consumer)Passes therenderAreafield to the specifiedConsumer.VkRenderPassBeginInforenderArea(VkRect2D value)Copies the specifiedVkRect2Dto therenderAreafield.longrenderPass()Returns the value of therenderPassfield.VkRenderPassBeginInforenderPass(long value)Sets the specified value to therenderPassfield.VkRenderPassBeginInfoset(int sType, long pNext, long renderPass, long framebuffer, VkRect2D renderArea, VkClearValue.Buffer pClearValues)Initializes this struct with the specified values.VkRenderPassBeginInfoset(VkRenderPassBeginInfo src)Copies the specified struct data to this struct.intsizeof()intsType()Returns the value of thesTypefield.VkRenderPassBeginInfosType(int value)Sets the specified value to thesTypefield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(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 aVkRenderPassBeginInfoinstance 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()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
renderPass
public long renderPass()
Returns the value of therenderPassfield.
-
framebuffer
public long framebuffer()
Returns the value of theframebufferfield.
-
clearValueCount
public int clearValueCount()
Returns the value of theclearValueCountfield.
-
pClearValues
@Nullable public VkClearValue.Buffer pClearValues()
Returns aVkClearValue.Bufferview of the struct array pointed to by thepClearValuesfield.
-
sType
public VkRenderPassBeginInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkRenderPassBeginInfo pNext(long value)
Sets the specified value to thepNextfield.
-
renderPass
public VkRenderPassBeginInfo renderPass(long value)
Sets the specified value to therenderPassfield.
-
framebuffer
public VkRenderPassBeginInfo framebuffer(long value)
Sets the specified value to theframebufferfield.
-
renderArea
public VkRenderPassBeginInfo renderArea(VkRect2D value)
Copies the specifiedVkRect2Dto therenderAreafield.
-
renderArea
public VkRenderPassBeginInfo renderArea(java.util.function.Consumer<VkRect2D> consumer)
Passes therenderAreafield to the specifiedConsumer.
-
pClearValues
public VkRenderPassBeginInfo pClearValues(@Nullable VkClearValue.Buffer value)
Sets the address of the specifiedVkClearValue.Bufferto thepClearValuesfield.
-
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 newVkRenderPassBeginInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkRenderPassBeginInfo calloc()
Returns a newVkRenderPassBeginInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkRenderPassBeginInfo create()
Returns a newVkRenderPassBeginInfoinstance allocated withBufferUtils.
-
create
public static VkRenderPassBeginInfo create(long address)
Returns a newVkRenderPassBeginInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VkRenderPassBeginInfo createSafe(long address)
-
malloc
public static VkRenderPassBeginInfo.Buffer malloc(int capacity)
Returns a newVkRenderPassBeginInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkRenderPassBeginInfo.Buffer calloc(int capacity)
Returns a newVkRenderPassBeginInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkRenderPassBeginInfo.Buffer create(int capacity)
Returns a newVkRenderPassBeginInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkRenderPassBeginInfo.Buffer create(long address, int capacity)
Create aVkRenderPassBeginInfo.Bufferinstance 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 newVkRenderPassBeginInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkRenderPassBeginInfo callocStack()
Returns a newVkRenderPassBeginInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkRenderPassBeginInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassBeginInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkRenderPassBeginInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassBeginInfoinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkRenderPassBeginInfo.Buffer callocStack(int capacity)
Returns a newVkRenderPassBeginInfo.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.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().
-
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 theclearValueCountfield 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
-
-