Package org.lwjgl.vulkan
Class VkFramebufferCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkFramebufferCreateInfo
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkFramebufferCreateInfo extends Struct
Khronos Reference Page
Vulkan SpecificationContains information about how a framebuffer should be created.
Valid Usage
sType
must beSTRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
pNext
must beNULL
flags
must be 0renderPass
must be a validVkRenderPass
handle- If
attachmentCount
is not 0,pAttachments
must be a pointer to an array ofattachmentCount
validVkImageView
handles - Each of
renderPass
and the elements ofpAttachments
that are valid handles must have been created, allocated or retrieved from the sameVkDevice
attachmentCount
must be equal to the attachment count specified inrenderPass
- Any given element of
pAttachments
that is used as a color attachment or resolve attachment byrenderPass
must have been created with ausage
value includingIMAGE_USAGE_COLOR_ATTACHMENT_BIT
- Any given element of
pAttachments
that is used as a depth/stencil attachment byrenderPass
must have been created with ausage
value includingIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- Any given element of
pAttachments
that is used as an input attachment byrenderPass
must have been created with ausage
value includingIMAGE_USAGE_INPUT_ATTACHMENT_BIT
- Any given element of
pAttachments
must have been created with anVkFormat
value that matches theVkFormat
specified by the correspondingVkAttachmentDescription
inrenderPass
- Any given element of
pAttachments
must have been created with asamples
value that matches thesamples
value specified by the correspondingVkAttachmentDescription
inrenderPass
- Any given element of
pAttachments
must have dimensions at least as large as the corresponding framebuffer dimension - Any given element of
pAttachments
must only specify a single mip-level - Any given element of
pAttachments
must have been created with the identity swizzle width
must be less than or equal toVkPhysicalDeviceLimits
::maxFramebufferWidth
height
must be less than or equal toVkPhysicalDeviceLimits
::maxFramebufferHeight
layers
must be less than or equal toVkPhysicalDeviceLimits
::maxFramebufferLayers
Member documentation
sType
– the type of this structure. Must be:STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
pNext
– reserved for use by extensionsflags
– reserved for future userenderPass
– a render pass that defines what render passes the framebuffer will be compatible withattachmentCount
– the number of attachmentspAttachments
– an array ofVkImageView
handles, each of which will be used as the corresponding attachment in a render pass instancewidth
– the framebuffer widthheight
– the framebuffer heightlayers
– the number of layers in the framebuffer
Layout
struct VkFramebufferCreateInfo { VkStructureType sType; const void * pNext; VkFramebufferCreateFlags flags; VkRenderPass renderPass; uint32_t attachmentCount; const VkImageView * pAttachments; uint32_t width; uint32_t height; uint32_t layers; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkFramebufferCreateInfo.Buffer
An array ofVkFramebufferCreateInfo
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 VkFramebufferCreateInfo(java.nio.ByteBuffer container)
Creates aVkFramebufferCreateInfo
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 int
attachmentCount()
Returns the value of theattachmentCount
field.static VkFramebufferCreateInfo
calloc()
Returns a newVkFramebufferCreateInfo
instance allocated withmemCalloc
.static VkFramebufferCreateInfo.Buffer
calloc(int capacity)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated withmemCalloc
.static VkFramebufferCreateInfo
callocStack()
Returns a newVkFramebufferCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkFramebufferCreateInfo.Buffer
callocStack(int capacity)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkFramebufferCreateInfo.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkFramebufferCreateInfo
callocStack(MemoryStack stack)
Returns a newVkFramebufferCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkFramebufferCreateInfo
create()
Returns a newVkFramebufferCreateInfo
instance allocated withBufferUtils
.static VkFramebufferCreateInfo.Buffer
create(int capacity)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated withBufferUtils
.static VkFramebufferCreateInfo
create(long address)
Returns a newVkFramebufferCreateInfo
instance for the specified memory address ornull
if the address isNULL
.static VkFramebufferCreateInfo.Buffer
create(long address, int capacity)
Create aVkFramebufferCreateInfo.Buffer
instance at the specified memory.int
flags()
Returns the value of theflags
field.VkFramebufferCreateInfo
flags(int value)
Sets the specified value to theflags
field.int
height()
Returns the value of theheight
field.VkFramebufferCreateInfo
height(int value)
Sets the specified value to theheight
field.int
layers()
Returns the value of thelayers
field.VkFramebufferCreateInfo
layers(int value)
Sets the specified value to thelayers
field.static VkFramebufferCreateInfo
malloc()
Returns a newVkFramebufferCreateInfo
instance allocated withmemAlloc
.static VkFramebufferCreateInfo.Buffer
malloc(int capacity)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated withmemAlloc
.static VkFramebufferCreateInfo
mallocStack()
Returns a newVkFramebufferCreateInfo
instance allocated on the thread-localMemoryStack
.static VkFramebufferCreateInfo.Buffer
mallocStack(int capacity)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkFramebufferCreateInfo.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkFramebufferCreateInfo
mallocStack(MemoryStack stack)
Returns a newVkFramebufferCreateInfo
instance allocated on the specifiedMemoryStack
.VkFramebufferCreateInfo
nset(long struct)
Unsafe version ofset
.java.nio.LongBuffer
pAttachments()
Returns aLongBuffer
view of the data pointed to by thepAttachments
field.VkFramebufferCreateInfo
pAttachments(java.nio.LongBuffer value)
Sets the address of the specifiedLongBuffer
to thepAttachments
field.long
pNext()
Returns the value of thepNext
field.VkFramebufferCreateInfo
pNext(long value)
Sets the specified value to thepNext
field.long
renderPass()
Returns the value of therenderPass
field.VkFramebufferCreateInfo
renderPass(long value)
Sets the specified value to therenderPass
field.VkFramebufferCreateInfo
set(int sType, long pNext, int flags, long renderPass, java.nio.LongBuffer pAttachments, int width, int height, int layers)
Initializes this struct with the specified values.VkFramebufferCreateInfo
set(VkFramebufferCreateInfo src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
sType()
Returns the value of thesType
field.VkFramebufferCreateInfo
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)
CallsVkFramebufferCreateInfo.validate(long)
for each struct contained in the specified struct array.int
width()
Returns the value of thewidth
field.VkFramebufferCreateInfo
width(int value)
Sets the specified value to thewidth
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
-
VkFramebufferCreateInfo
public VkFramebufferCreateInfo(java.nio.ByteBuffer container)
Creates aVkFramebufferCreateInfo
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)
.
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
renderPass
public long renderPass()
Returns the value of therenderPass
field.
-
attachmentCount
public int attachmentCount()
Returns the value of theattachmentCount
field.
-
pAttachments
public java.nio.LongBuffer pAttachments()
Returns aLongBuffer
view of the data pointed to by thepAttachments
field.
-
width
public int width()
Returns the value of thewidth
field.
-
height
public int height()
Returns the value of theheight
field.
-
layers
public int layers()
Returns the value of thelayers
field.
-
sType
public VkFramebufferCreateInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkFramebufferCreateInfo pNext(long value)
Sets the specified value to thepNext
field.
-
flags
public VkFramebufferCreateInfo flags(int value)
Sets the specified value to theflags
field.
-
renderPass
public VkFramebufferCreateInfo renderPass(long value)
Sets the specified value to therenderPass
field.
-
pAttachments
public VkFramebufferCreateInfo pAttachments(java.nio.LongBuffer value)
Sets the address of the specifiedLongBuffer
to thepAttachments
field.
-
width
public VkFramebufferCreateInfo width(int value)
Sets the specified value to thewidth
field.
-
height
public VkFramebufferCreateInfo height(int value)
Sets the specified value to theheight
field.
-
layers
public VkFramebufferCreateInfo layers(int value)
Sets the specified value to thelayers
field.
-
set
public VkFramebufferCreateInfo set(int sType, long pNext, int flags, long renderPass, java.nio.LongBuffer pAttachments, int width, int height, int layers)
Initializes this struct with the specified values.
-
nset
public VkFramebufferCreateInfo nset(long struct)
Unsafe version ofset
.
-
set
public VkFramebufferCreateInfo set(VkFramebufferCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkFramebufferCreateInfo malloc()
Returns a newVkFramebufferCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkFramebufferCreateInfo calloc()
Returns a newVkFramebufferCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkFramebufferCreateInfo create()
Returns a newVkFramebufferCreateInfo
instance allocated withBufferUtils
.
-
create
public static VkFramebufferCreateInfo create(long address)
Returns a newVkFramebufferCreateInfo
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkFramebufferCreateInfo.Buffer malloc(int capacity)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkFramebufferCreateInfo.Buffer calloc(int capacity)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkFramebufferCreateInfo.Buffer create(int capacity)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkFramebufferCreateInfo.Buffer create(long address, int capacity)
Create aVkFramebufferCreateInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkFramebufferCreateInfo mallocStack()
Returns a newVkFramebufferCreateInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkFramebufferCreateInfo callocStack()
Returns a newVkFramebufferCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkFramebufferCreateInfo mallocStack(MemoryStack stack)
Returns a newVkFramebufferCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkFramebufferCreateInfo callocStack(MemoryStack stack)
Returns a newVkFramebufferCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkFramebufferCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkFramebufferCreateInfo.Buffer callocStack(int capacity)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkFramebufferCreateInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkFramebufferCreateInfo.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkFramebufferCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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)
CallsVkFramebufferCreateInfo.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-