Package org.lwjgl.vulkan
Class VkClearColorValue
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkClearColorValue>
org.lwjgl.vulkan.VkClearColorValue
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkClearColorValue
extends org.lwjgl.system.Struct<VkClearColorValue>
implements org.lwjgl.system.NativeResource
Structure specifying a clear color value.
Description
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.
If the image or attachment format has a 64-bit component width, the first 2 array elements of each of the arrays above are reinterpreted as a single 64-bit element for the R component. The next 2 array elements are used in the same way for the G component. In other words, the union behaves as if it had the following additional members:
double float64[2];
int64_t int64[2];
uint64_t uint64[2];
See Also
VkClearValue, VkSamplerCustomBorderColorCreateInfoEXT, CmdClearColorImage
Layout
union VkClearColorValue {
float float32()[4];
int32_t int32()[4];
uint32_t uint32()[4];
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkClearColorValue(ByteBuffer container) Creates aVkClearColorValueinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkClearColorValuecalloc()Returns a newVkClearColorValueinstance allocated withmemCalloc.static VkClearColorValue.Buffercalloc(int capacity) Returns a newVkClearColorValue.Bufferinstance allocated withmemCalloc.static VkClearColorValue.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkClearColorValue.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkClearColorValuecalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkClearColorValueinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkClearColorValueDeprecated.static VkClearColorValue.BuffercallocStack(int capacity) Deprecated.static VkClearColorValue.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkClearColorValuecallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static VkClearColorValuecreate()Returns a newVkClearColorValueinstance allocated withBufferUtils.static VkClearColorValue.Buffercreate(int capacity) Returns a newVkClearColorValue.Bufferinstance allocated withBufferUtils.static VkClearColorValuecreate(long address) Returns a newVkClearColorValueinstance for the specified memory address.static VkClearColorValue.Buffercreate(long address, int capacity) Create aVkClearColorValue.Bufferinstance at the specified memory.static @Nullable VkClearColorValuecreateSafe(long address) static @Nullable VkClearColorValue.BuffercreateSafe(long address, int capacity) float32()are the color clear values when the format of the image or attachment is one of the numeric formats with a numeric type that is floating-point.floatfloat32(int index) are the color clear values when the format of the image or attachment is one of the numeric formats with a numeric type that is floating-point.float32(int index, float value) Sets the specified value at the specified index of thefloat32()field.float32(FloatBuffer value) Copies the specifiedFloatBufferto thefloat32()field.int32()are the color clear values when the format of the image or attachment has a numeric type that is signed integer (SINT).intint32(int index) are the color clear values when the format of the image or attachment has a numeric type that is signed integer (SINT).int32(int index, int value) Sets the specified value at the specified index of theint32()field.static VkClearColorValuemalloc()Returns a newVkClearColorValueinstance allocated withmemAlloc.static VkClearColorValue.Buffermalloc(int capacity) Returns a newVkClearColorValue.Bufferinstance allocated withmemAlloc.static VkClearColorValue.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkClearColorValue.Bufferinstance allocated on the specifiedMemoryStack.static VkClearColorValuemalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkClearColorValueinstance allocated on the specifiedMemoryStack.static VkClearColorValueDeprecated.static VkClearColorValue.BuffermallocStack(int capacity) Deprecated.static VkClearColorValue.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkClearColorValuemallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static FloatBuffernfloat32(long struct) Unsafe version offloat32().static floatnfloat32(long struct, int index) Unsafe version offloat32.static voidnfloat32(long struct, int index, float value) Unsafe version offloat32.static voidnfloat32(long struct, FloatBuffer value) Unsafe version offloat32.static IntBuffernint32(long struct) Unsafe version ofint32().static intnint32(long struct, int index) Unsafe version ofint32.static voidnint32(long struct, int index, int value) Unsafe version ofint32.static voidUnsafe version ofint32.static IntBuffernuint32(long struct) Unsafe version ofuint32().static intnuint32(long struct, int index) Unsafe version ofuint32.static voidnuint32(long struct, int index, int value) Unsafe version ofuint32.static voidUnsafe version ofuint32.set(VkClearColorValue src) Copies the specified struct data to this struct.intsizeof()uint32()are the color clear values when the format of the image or attachment has a numeric type that is unsigned integer (UINT).intuint32(int index) are the color clear values when the format of the image or attachment has a numeric type that is unsigned integer (UINT).uint32(int index, int value) Sets the specified value at the specified index of theuint32()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
FLOAT32
public static final int FLOAT32The struct member offsets. -
INT32
public static final int INT32The struct member offsets. -
UINT32
public static final int UINT32The struct member offsets.
-
-
Constructor Details
-
VkClearColorValue
Creates aVkClearColorValueinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkClearColorValue>
-
float32
are the color clear values when the format of the image or attachment is one of the numeric formats with a numeric type that is floating-point. 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. -
float32
public float float32(int index) are the color clear values when the format of the image or attachment is one of the numeric formats with a numeric type that is floating-point. 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
are the color clear values when the format of the image or attachment has a numeric type that 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. -
int32
public int int32(int index) are the color clear values when the format of the image or attachment has a numeric type that 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
are the color clear values when the format of the image or attachment has a numeric type that is unsigned integer (UINT). Unsigned integer values are converted to the format of the image by casting to the integer type with fewer bits. -
uint32
public int uint32(int index) are the color clear values when the format of the image or attachment has a numeric type that is unsigned integer (UINT). Unsigned integer values are converted to the format of the image by casting to the integer type with fewer bits. -
float32
Copies the specifiedFloatBufferto thefloat32()field. -
float32
Sets the specified value at the specified index of thefloat32()field. -
int32
-
int32
Sets the specified value at the specified index of theint32()field. -
uint32
-
uint32
Sets the specified value at the specified index of theuint32()field. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkClearColorValueinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkClearColorValueinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkClearColorValueinstance allocated withBufferUtils. -
create
Returns a newVkClearColorValueinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkClearColorValue.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkClearColorValue.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkClearColorValue.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkClearColorValue.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VkClearColorValue.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VkClearColorValue.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkClearColorValueinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkClearColorValueinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkClearColorValue.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkClearColorValue.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nfloat32
Unsafe version offloat32(). -
nfloat32
public static float nfloat32(long struct, int index) Unsafe version offloat32. -
nint32
Unsafe version ofint32(). -
nint32
public static int nint32(long struct, int index) Unsafe version ofint32. -
nuint32
Unsafe version ofuint32(). -
nuint32
public static int nuint32(long struct, int index) Unsafe version ofuint32. -
nfloat32
Unsafe version offloat32. -
nfloat32
public static void nfloat32(long struct, int index, float value) Unsafe version offloat32. -
nint32
Unsafe version ofint32. -
nint32
public static void nint32(long struct, int index, int value) Unsafe version ofint32. -
nuint32
Unsafe version ofuint32. -
nuint32
public static void nuint32(long struct, int index, int value) Unsafe version ofuint32.
-