public class VkClearValue
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
This union is used where part of the API requires either color or depth/stencil clear values, depending on the attachment, and defines the initial clear values in the VkRenderPassBeginInfo structure.
VkClearAttachment, VkClearColorValue, VkClearDepthStencilValue, VkRenderPassBeginInfo
color – specifies the color image clear values to use when clearing a color image or attachment.depthStencil – specifies the depth and stencil clear values to use when clearing a depth/stencil image or attachment.
union VkClearValue {
VkClearColorValue color;
VkClearDepthStencilValue depthStencil;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkClearValue.Buffer
An array of
VkClearValue structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
COLOR
The struct member offsets.
|
static int |
DEPTHSTENCIL
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
VkClearValue(java.nio.ByteBuffer container)
Creates a
VkClearValue instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkClearValue |
calloc()
Returns a new
VkClearValue instance allocated with memCalloc. |
static VkClearValue.Buffer |
calloc(int capacity)
Returns a new
VkClearValue.Buffer instance allocated with memCalloc. |
static VkClearValue |
callocStack()
Returns a new
VkClearValue instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkClearValue.Buffer |
callocStack(int capacity)
Returns a new
VkClearValue.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkClearValue.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkClearValue.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkClearValue |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkClearValue instance allocated on the specified MemoryStack and initializes all its bits to zero. |
VkClearColorValue |
color()
Returns a
VkClearColorValue view of the color field. |
VkClearValue |
color(java.util.function.Consumer<VkClearColorValue> consumer)
Passes the
color field to the specified Consumer. |
VkClearValue |
color(VkClearColorValue value)
Copies the specified
VkClearColorValue to the color field. |
static VkClearValue |
create()
Returns a new
VkClearValue instance allocated with BufferUtils. |
static VkClearValue.Buffer |
create(int capacity)
Returns a new
VkClearValue.Buffer instance allocated with BufferUtils. |
static VkClearValue |
create(long address)
Returns a new
VkClearValue instance for the specified memory address. |
static VkClearValue.Buffer |
create(long address,
int capacity)
Create a
VkClearValue.Buffer instance at the specified memory. |
static VkClearValue |
createSafe(long address)
|
static VkClearValue.Buffer |
createSafe(long address,
int capacity)
|
VkClearDepthStencilValue |
depthStencil()
Returns a
VkClearDepthStencilValue view of the depthStencil field. |
VkClearValue |
depthStencil(java.util.function.Consumer<VkClearDepthStencilValue> consumer)
Passes the
depthStencil field to the specified Consumer. |
VkClearValue |
depthStencil(VkClearDepthStencilValue value)
Copies the specified
VkClearDepthStencilValue to the depthStencil field. |
static VkClearValue |
malloc()
Returns a new
VkClearValue instance allocated with memAlloc. |
static VkClearValue.Buffer |
malloc(int capacity)
Returns a new
VkClearValue.Buffer instance allocated with memAlloc. |
static VkClearValue |
mallocStack()
Returns a new
VkClearValue instance allocated on the thread-local MemoryStack. |
static VkClearValue.Buffer |
mallocStack(int capacity)
Returns a new
VkClearValue.Buffer instance allocated on the thread-local MemoryStack. |
static VkClearValue.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkClearValue.Buffer instance allocated on the specified MemoryStack. |
static VkClearValue |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkClearValue instance allocated on the specified MemoryStack. |
static VkClearColorValue |
ncolor(long struct)
Unsafe version of
color(). |
static void |
ncolor(long struct,
VkClearColorValue value)
Unsafe version of
color. |
static VkClearDepthStencilValue |
ndepthStencil(long struct)
Unsafe version of
depthStencil(). |
static void |
ndepthStencil(long struct,
VkClearDepthStencilValue value)
Unsafe version of
depthStencil. |
VkClearValue |
set(VkClearValue src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int COLOR
public static final int DEPTHSTENCIL
public VkClearValue(java.nio.ByteBuffer container)
VkClearValue instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic VkClearColorValue color()
VkClearColorValue view of the color field.public VkClearDepthStencilValue depthStencil()
VkClearDepthStencilValue view of the depthStencil field.public VkClearValue color(VkClearColorValue value)
VkClearColorValue to the color field.public VkClearValue color(java.util.function.Consumer<VkClearColorValue> consumer)
color field to the specified Consumer.public VkClearValue depthStencil(VkClearDepthStencilValue value)
VkClearDepthStencilValue to the depthStencil field.public VkClearValue depthStencil(java.util.function.Consumer<VkClearDepthStencilValue> consumer)
depthStencil field to the specified Consumer.public VkClearValue set(VkClearValue src)
src - the source structpublic static VkClearValue malloc()
VkClearValue instance allocated with memAlloc. The instance must be explicitly freed.public static VkClearValue calloc()
VkClearValue instance allocated with memCalloc. The instance must be explicitly freed.public static VkClearValue create()
VkClearValue instance allocated with BufferUtils.public static VkClearValue create(long address)
VkClearValue instance for the specified memory address.@Nullable public static VkClearValue createSafe(long address)
public static VkClearValue.Buffer malloc(int capacity)
VkClearValue.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkClearValue.Buffer calloc(int capacity)
VkClearValue.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkClearValue.Buffer create(int capacity)
VkClearValue.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkClearValue.Buffer create(long address, int capacity)
VkClearValue.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkClearValue.Buffer createSafe(long address, int capacity)
public static VkClearValue mallocStack()
VkClearValue instance allocated on the thread-local MemoryStack.public static VkClearValue callocStack()
VkClearValue instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkClearValue mallocStack(org.lwjgl.system.MemoryStack stack)
VkClearValue instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkClearValue callocStack(org.lwjgl.system.MemoryStack stack)
VkClearValue instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkClearValue.Buffer mallocStack(int capacity)
VkClearValue.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkClearValue.Buffer callocStack(int capacity)
VkClearValue.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkClearValue.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkClearValue.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkClearValue.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkClearValue.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkClearColorValue ncolor(long struct)
color().public static VkClearDepthStencilValue ndepthStencil(long struct)
depthStencil().public static void ncolor(long struct,
VkClearColorValue value)
color.public static void ndepthStencil(long struct,
VkClearDepthStencilValue value)
depthStencil.Copyright LWJGL. All Rights Reserved. License terms.