Package org.lwjgl.vulkan
Class VkComponentMapping
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Structure specifying a color component mapping.
Valid Usage (Implicit)
r
must be a validVkComponentSwizzle
valueg
must be a validVkComponentSwizzle
valueb
must be a validVkComponentSwizzle
valuea
must be a validVkComponentSwizzle
value
See Also
VkAndroidHardwareBufferFormatProperties2ANDROID
, VkAndroidHardwareBufferFormatPropertiesANDROID
, VkImageViewCreateInfo
, VkSamplerBorderColorComponentMappingCreateInfoEXT
, VkSamplerYcbcrConversionCreateInfo
, VkVideoFormatPropertiesKHR
Layout
struct VkComponentMapping {
VkComponentSwizzle r()
;
VkComponentSwizzle g()
;
VkComponentSwizzle b()
;
VkComponentSwizzle a()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct member offsets.static final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionVkComponentMapping
(ByteBuffer container) Creates aVkComponentMapping
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionint
a()
aVkComponentSwizzle
specifying the component value placed in the A component of the output vector.a
(int value) Sets the specified value to thea()
field.int
b()
aVkComponentSwizzle
specifying the component value placed in the B component of the output vector.b
(int value) Sets the specified value to theb()
field.static VkComponentMapping
calloc()
Returns a newVkComponentMapping
instance allocated withmemCalloc
.static VkComponentMapping.Buffer
calloc
(int capacity) Returns a newVkComponentMapping.Buffer
instance allocated withmemCalloc
.static VkComponentMapping.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newVkComponentMapping.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkComponentMapping
calloc
(MemoryStack stack) Returns a newVkComponentMapping
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkComponentMapping
Deprecated.static VkComponentMapping.Buffer
callocStack
(int capacity) Deprecated.static VkComponentMapping.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static VkComponentMapping
callocStack
(MemoryStack stack) Deprecated.static VkComponentMapping
create()
Returns a newVkComponentMapping
instance allocated withBufferUtils
.static VkComponentMapping.Buffer
create
(int capacity) Returns a newVkComponentMapping.Buffer
instance allocated withBufferUtils
.static VkComponentMapping
create
(long address) Returns a newVkComponentMapping
instance for the specified memory address.static VkComponentMapping.Buffer
create
(long address, int capacity) Create aVkComponentMapping.Buffer
instance at the specified memory.static VkComponentMapping
createSafe
(long address) static VkComponentMapping.Buffer
createSafe
(long address, int capacity) int
g()
aVkComponentSwizzle
specifying the component value placed in the G component of the output vector.g
(int value) Sets the specified value to theg()
field.static VkComponentMapping
malloc()
Returns a newVkComponentMapping
instance allocated withmemAlloc
.static VkComponentMapping.Buffer
malloc
(int capacity) Returns a newVkComponentMapping.Buffer
instance allocated withmemAlloc
.static VkComponentMapping.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newVkComponentMapping.Buffer
instance allocated on the specifiedMemoryStack
.static VkComponentMapping
malloc
(MemoryStack stack) Returns a newVkComponentMapping
instance allocated on the specifiedMemoryStack
.static VkComponentMapping
Deprecated.static VkComponentMapping.Buffer
mallocStack
(int capacity) Deprecated.static VkComponentMapping.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static VkComponentMapping
mallocStack
(MemoryStack stack) Deprecated.static int
na
(long struct) Unsafe version ofa()
.static void
na
(long struct, int value) Unsafe version ofa
.static int
nb
(long struct) Unsafe version ofb()
.static void
nb
(long struct, int value) Unsafe version ofb
.static int
ng
(long struct) Unsafe version ofg()
.static void
ng
(long struct, int value) Unsafe version ofg
.static int
nr
(long struct) Unsafe version ofr()
.static void
nr
(long struct, int value) Unsafe version ofr
.int
r()
aVkComponentSwizzle
specifying the component value placed in the R component of the output vector.r
(int value) Sets the specified value to ther()
field.set
(int r, int g, int b, int a) Initializes this struct with the specified values.set
(VkComponentMapping src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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. -
R
public static final int RThe struct member offsets. -
G
public static final int GThe struct member offsets. -
B
public static final int BThe struct member offsets. -
A
public static final int AThe struct member offsets.
-
-
Constructor Details
-
VkComponentMapping
Creates aVkComponentMapping
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<VkComponentMapping>
-
r
public int r()aVkComponentSwizzle
specifying the component value placed in the R component of the output vector. -
g
public int g()aVkComponentSwizzle
specifying the component value placed in the G component of the output vector. -
b
public int b()aVkComponentSwizzle
specifying the component value placed in the B component of the output vector. -
a
public int a()aVkComponentSwizzle
specifying the component value placed in the A component of the output vector. -
r
Sets the specified value to ther()
field. -
g
Sets the specified value to theg()
field. -
b
Sets the specified value to theb()
field. -
a
Sets the specified value to thea()
field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newVkComponentMapping
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newVkComponentMapping
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newVkComponentMapping
instance allocated withBufferUtils
. -
create
Returns a newVkComponentMapping
instance for the specified memory address. -
createSafe
-
malloc
Returns a newVkComponentMapping.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newVkComponentMapping.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newVkComponentMapping.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aVkComponentMapping.Buffer
instance 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.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newVkComponentMapping
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newVkComponentMapping
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newVkComponentMapping.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newVkComponentMapping.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nr
public static int nr(long struct) Unsafe version ofr()
. -
ng
public static int ng(long struct) Unsafe version ofg()
. -
nb
public static int nb(long struct) Unsafe version ofb()
. -
na
public static int na(long struct) Unsafe version ofa()
. -
nr
public static void nr(long struct, int value) Unsafe version ofr
. -
ng
public static void ng(long struct, int value) Unsafe version ofg
. -
nb
public static void nb(long struct, int value) Unsafe version ofb
. -
na
public static void na(long struct, int value) Unsafe version ofa
.
-