public class VkClearColorValue
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
The four array elements of the clear color map to R, G, B, and A components of image formats, in order.
If the image has more than one sample, the same value is written to all samples for any pixels being cleared.
VkClearValue, CmdClearColorImage
float32[4] – are the color clear values when the format of the image or attachment is one of the formats in the Interpretation of Numeric Format table other than signed integer (SINT) or unsigned integer (UINT). Floating point values are automatically converted to the format of the image, with the clear value being treated as linear if the image is sRGB.int32[4] – are the color clear values when the format of the image or attachment is signed integer (SINT). Signed integer values are converted to the format of the image by casting to the smaller type (with negative 32-bit values mapping to negative values in the smaller type). If the integer clear value is not representable in the target type (e.g. would overflow in conversion to that type), the clear value is undefined.uint32[4] – are the color clear values when the format of the image or attachment is unsigned integer (UINT). Unsigned integer values are converted to the format of the image by casting to the integer type with fewer bits.
union VkClearColorValue {
float float32[4];
int32_t int32[4];
uint32_t uint32[4];
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkClearColorValue.Buffer
An array of
VkClearColorValue structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
FLOAT32
The struct member offsets.
|
static int |
INT32
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
UINT32
The struct member offsets.
|
| Constructor and Description |
|---|
VkClearColorValue(java.nio.ByteBuffer container)
Creates a
VkClearColorValue instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkClearColorValue |
calloc()
Returns a new
VkClearColorValue instance allocated with memCalloc. |
static VkClearColorValue.Buffer |
calloc(int capacity)
Returns a new
VkClearColorValue.Buffer instance allocated with memCalloc. |
static VkClearColorValue |
callocStack()
Returns a new
VkClearColorValue instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkClearColorValue.Buffer |
callocStack(int capacity)
Returns a new
VkClearColorValue.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkClearColorValue.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkClearColorValue.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkClearColorValue |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkClearColorValue instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkClearColorValue |
create()
Returns a new
VkClearColorValue instance allocated with BufferUtils. |
static VkClearColorValue.Buffer |
create(int capacity)
Returns a new
VkClearColorValue.Buffer instance allocated with BufferUtils. |
static VkClearColorValue |
create(long address)
Returns a new
VkClearColorValue instance for the specified memory address. |
static VkClearColorValue.Buffer |
create(long address,
int capacity)
Create a
VkClearColorValue.Buffer instance at the specified memory. |
static VkClearColorValue |
createSafe(long address)
|
static VkClearColorValue.Buffer |
createSafe(long address,
int capacity)
|
java.nio.FloatBuffer |
float32()
Returns a
FloatBuffer view of the float32 field. |
VkClearColorValue |
float32(java.nio.FloatBuffer value)
Copies the specified
FloatBuffer to the float32 field. |
float |
float32(int index)
Returns the value at the specified index of the
float32 field. |
VkClearColorValue |
float32(int index,
float value)
Sets the specified value at the specified index of the
float32 field. |
java.nio.IntBuffer |
int32()
Returns a
IntBuffer view of the int32 field. |
int |
int32(int index)
Returns the value at the specified index of the
int32 field. |
VkClearColorValue |
int32(java.nio.IntBuffer value)
Copies the specified
IntBuffer to the int32 field. |
VkClearColorValue |
int32(int index,
int value)
Sets the specified value at the specified index of the
int32 field. |
static VkClearColorValue |
malloc()
Returns a new
VkClearColorValue instance allocated with memAlloc. |
static VkClearColorValue.Buffer |
malloc(int capacity)
Returns a new
VkClearColorValue.Buffer instance allocated with memAlloc. |
static VkClearColorValue |
mallocStack()
Returns a new
VkClearColorValue instance allocated on the thread-local MemoryStack. |
static VkClearColorValue.Buffer |
mallocStack(int capacity)
Returns a new
VkClearColorValue.Buffer instance allocated on the thread-local MemoryStack. |
static VkClearColorValue.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkClearColorValue.Buffer instance allocated on the specified MemoryStack. |
static VkClearColorValue |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkClearColorValue instance allocated on the specified MemoryStack. |
static java.nio.FloatBuffer |
nfloat32(long struct)
Unsafe version of
float32(). |
static void |
nfloat32(long struct,
java.nio.FloatBuffer value)
Unsafe version of
float32. |
static float |
nfloat32(long struct,
int index)
Unsafe version of
float32. |
static void |
nfloat32(long struct,
int index,
float value)
Unsafe version of
float32. |
static java.nio.IntBuffer |
nint32(long struct)
Unsafe version of
int32(). |
static int |
nint32(long struct,
int index)
Unsafe version of
int32. |
static void |
nint32(long struct,
java.nio.IntBuffer value)
Unsafe version of
int32. |
static void |
nint32(long struct,
int index,
int value)
Unsafe version of
int32. |
static java.nio.IntBuffer |
nuint32(long struct)
Unsafe version of
uint32(). |
static int |
nuint32(long struct,
int index)
Unsafe version of
uint32. |
static void |
nuint32(long struct,
java.nio.IntBuffer value)
Unsafe version of
uint32. |
static void |
nuint32(long struct,
int index,
int value)
Unsafe version of
uint32. |
VkClearColorValue |
set(VkClearColorValue src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
java.nio.IntBuffer |
uint32()
Returns a
IntBuffer view of the uint32 field. |
int |
uint32(int index)
Returns the value at the specified index of the
uint32 field. |
VkClearColorValue |
uint32(java.nio.IntBuffer value)
Copies the specified
IntBuffer to the uint32 field. |
VkClearColorValue |
uint32(int index,
int value)
Sets the specified value at the specified index of the
uint32 field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int FLOAT32
public static final int INT32
public static final int UINT32
public VkClearColorValue(java.nio.ByteBuffer container)
VkClearColorValue 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 java.nio.FloatBuffer float32()
FloatBuffer view of the float32 field.public float float32(int index)
float32 field.public java.nio.IntBuffer int32()
IntBuffer view of the int32 field.public int int32(int index)
int32 field.public java.nio.IntBuffer uint32()
IntBuffer view of the uint32 field.public int uint32(int index)
uint32 field.public VkClearColorValue float32(java.nio.FloatBuffer value)
FloatBuffer to the float32 field.public VkClearColorValue float32(int index, float value)
float32 field.public VkClearColorValue int32(java.nio.IntBuffer value)
IntBuffer to the int32 field.public VkClearColorValue int32(int index, int value)
int32 field.public VkClearColorValue uint32(java.nio.IntBuffer value)
IntBuffer to the uint32 field.public VkClearColorValue uint32(int index, int value)
uint32 field.public VkClearColorValue set(VkClearColorValue src)
src - the source structpublic static VkClearColorValue malloc()
VkClearColorValue instance allocated with memAlloc. The instance must be explicitly freed.public static VkClearColorValue calloc()
VkClearColorValue instance allocated with memCalloc. The instance must be explicitly freed.public static VkClearColorValue create()
VkClearColorValue instance allocated with BufferUtils.public static VkClearColorValue create(long address)
VkClearColorValue instance for the specified memory address.@Nullable public static VkClearColorValue createSafe(long address)
public static VkClearColorValue.Buffer malloc(int capacity)
VkClearColorValue.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkClearColorValue.Buffer calloc(int capacity)
VkClearColorValue.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkClearColorValue.Buffer create(int capacity)
VkClearColorValue.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkClearColorValue.Buffer create(long address, int capacity)
VkClearColorValue.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkClearColorValue.Buffer createSafe(long address, int capacity)
public static VkClearColorValue mallocStack()
VkClearColorValue instance allocated on the thread-local MemoryStack.public static VkClearColorValue callocStack()
VkClearColorValue instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkClearColorValue mallocStack(org.lwjgl.system.MemoryStack stack)
VkClearColorValue instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkClearColorValue callocStack(org.lwjgl.system.MemoryStack stack)
VkClearColorValue instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkClearColorValue.Buffer mallocStack(int capacity)
VkClearColorValue.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkClearColorValue.Buffer callocStack(int capacity)
VkClearColorValue.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkClearColorValue.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkClearColorValue.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkClearColorValue.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkClearColorValue.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 java.nio.FloatBuffer nfloat32(long struct)
float32().public static float nfloat32(long struct,
int index)
float32.public static java.nio.IntBuffer nint32(long struct)
int32().public static int nint32(long struct,
int index)
int32.public static java.nio.IntBuffer nuint32(long struct)
uint32().public static int nuint32(long struct,
int index)
uint32.public static void nfloat32(long struct,
java.nio.FloatBuffer value)
float32.public static void nfloat32(long struct,
int index,
float value)
float32.public static void nint32(long struct,
java.nio.IntBuffer value)
int32.public static void nint32(long struct,
int index,
int value)
int32.public static void nuint32(long struct,
java.nio.IntBuffer value)
uint32.public static void nuint32(long struct,
int index,
int value)
uint32.Copyright LWJGL. All Rights Reserved. License terms.