Package org.lwjgl.vulkan
Class VkComponentMapping
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkComponentMapping
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkComponentMapping extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
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
VkImageViewCreateInfo
,VkSamplerYcbcrConversionCreateInfo
Member documentation
r
– aVkComponentSwizzle
specifying the component value placed in the R component of the output vector.g
– aVkComponentSwizzle
specifying the component value placed in the G component of the output vector.b
– aVkComponentSwizzle
specifying the component value placed in the B component of the output vector.a
– aVkComponentSwizzle
specifying the component value placed in the A component of the output vector.
Layout
struct VkComponentMapping { VkComponentSwizzle r; VkComponentSwizzle g; VkComponentSwizzle b; VkComponentSwizzle a; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkComponentMapping.Buffer
An array ofVkComponentMapping
structs.
-
Constructor Summary
Constructors Constructor Description VkComponentMapping(java.nio.ByteBuffer container)
Creates aVkComponentMapping
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
a()
Returns the value of thea
field.VkComponentMapping
a(int value)
Sets the specified value to thea
field.int
b()
Returns the value of theb
field.VkComponentMapping
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
callocStack()
Returns a newVkComponentMapping
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkComponentMapping.Buffer
callocStack(int capacity)
Returns a newVkComponentMapping.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkComponentMapping.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkComponentMapping.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkComponentMapping
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComponentMapping
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.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()
Returns the value of theg
field.VkComponentMapping
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
mallocStack()
Returns a newVkComponentMapping
instance allocated on the thread-localMemoryStack
.static VkComponentMapping.Buffer
mallocStack(int capacity)
Returns a newVkComponentMapping.Buffer
instance allocated on the thread-localMemoryStack
.static VkComponentMapping.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkComponentMapping.Buffer
instance allocated on the specifiedMemoryStack
.static VkComponentMapping
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComponentMapping
instance allocated on the specifiedMemoryStack
.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()
Returns the value of ther
field.VkComponentMapping
r(int value)
Sets the specified value to ther
field.VkComponentMapping
set(int r, int g, int b, int a)
Initializes this struct with the specified values.VkComponentMapping
set(VkComponentMapping src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
VkComponentMapping
public VkComponentMapping(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
r
public int r()
Returns the value of ther
field.
-
g
public int g()
Returns the value of theg
field.
-
b
public int b()
Returns the value of theb
field.
-
a
public int a()
Returns the value of thea
field.
-
r
public VkComponentMapping r(int value)
Sets the specified value to ther
field.
-
g
public VkComponentMapping g(int value)
Sets the specified value to theg
field.
-
b
public VkComponentMapping b(int value)
Sets the specified value to theb
field.
-
a
public VkComponentMapping a(int value)
Sets the specified value to thea
field.
-
set
public VkComponentMapping set(int r, int g, int b, int a)
Initializes this struct with the specified values.
-
set
public VkComponentMapping set(VkComponentMapping src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkComponentMapping malloc()
Returns a newVkComponentMapping
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkComponentMapping calloc()
Returns a newVkComponentMapping
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkComponentMapping create()
Returns a newVkComponentMapping
instance allocated withBufferUtils
.
-
create
public static VkComponentMapping create(long address)
Returns a newVkComponentMapping
instance for the specified memory address.
-
createSafe
@Nullable public static VkComponentMapping createSafe(long address)
-
malloc
public static VkComponentMapping.Buffer malloc(int capacity)
Returns a newVkComponentMapping.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkComponentMapping.Buffer calloc(int capacity)
Returns a newVkComponentMapping.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkComponentMapping.Buffer create(int capacity)
Returns a newVkComponentMapping.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkComponentMapping.Buffer create(long address, int capacity)
Create aVkComponentMapping.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkComponentMapping.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkComponentMapping mallocStack()
Returns a newVkComponentMapping
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkComponentMapping callocStack()
Returns a newVkComponentMapping
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkComponentMapping mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComponentMapping
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkComponentMapping callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComponentMapping
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkComponentMapping.Buffer mallocStack(int capacity)
Returns a newVkComponentMapping.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkComponentMapping.Buffer callocStack(int capacity)
Returns a newVkComponentMapping.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkComponentMapping.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkComponentMapping.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkComponentMapping.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkComponentMapping.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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
.
-
-