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.NativeResourceStructure specifying a color component mapping.Valid Usage (Implicit)
rmust be a validVkComponentSwizzlevaluegmust be a validVkComponentSwizzlevaluebmust be a validVkComponentSwizzlevalueamust be a validVkComponentSwizzlevalue
See Also
VkImageViewCreateInfo,VkSamplerYcbcrConversionCreateInfoMember documentation
r– aVkComponentSwizzlespecifying the component value placed in the R component of the output vector.g– aVkComponentSwizzlespecifying the component value placed in the G component of the output vector.b– aVkComponentSwizzlespecifying the component value placed in the B component of the output vector.a– aVkComponentSwizzlespecifying 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 classVkComponentMapping.BufferAn array ofVkComponentMappingstructs.
-
Constructor Summary
Constructors Constructor Description VkComponentMapping(java.nio.ByteBuffer container)Creates aVkComponentMappinginstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description inta()Returns the value of theafield.VkComponentMappinga(int value)Sets the specified value to theafield.intb()Returns the value of thebfield.VkComponentMappingb(int value)Sets the specified value to thebfield.static VkComponentMappingcalloc()Returns a newVkComponentMappinginstance allocated withmemCalloc.static VkComponentMapping.Buffercalloc(int capacity)Returns a newVkComponentMapping.Bufferinstance allocated withmemCalloc.static VkComponentMappingcallocStack()Returns a newVkComponentMappinginstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkComponentMapping.BuffercallocStack(int capacity)Returns a newVkComponentMapping.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkComponentMapping.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkComponentMapping.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkComponentMappingcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkComponentMappinginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkComponentMappingcreate()Returns a newVkComponentMappinginstance allocated withBufferUtils.static VkComponentMapping.Buffercreate(int capacity)Returns a newVkComponentMapping.Bufferinstance allocated withBufferUtils.static VkComponentMappingcreate(long address)Returns a newVkComponentMappinginstance for the specified memory address.static VkComponentMapping.Buffercreate(long address, int capacity)Create aVkComponentMapping.Bufferinstance at the specified memory.static VkComponentMappingcreateSafe(long address)static VkComponentMapping.BuffercreateSafe(long address, int capacity)intg()Returns the value of thegfield.VkComponentMappingg(int value)Sets the specified value to thegfield.static VkComponentMappingmalloc()Returns a newVkComponentMappinginstance allocated withmemAlloc.static VkComponentMapping.Buffermalloc(int capacity)Returns a newVkComponentMapping.Bufferinstance allocated withmemAlloc.static VkComponentMappingmallocStack()Returns a newVkComponentMappinginstance allocated on the thread-localMemoryStack.static VkComponentMapping.BuffermallocStack(int capacity)Returns a newVkComponentMapping.Bufferinstance allocated on the thread-localMemoryStack.static VkComponentMapping.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkComponentMapping.Bufferinstance allocated on the specifiedMemoryStack.static VkComponentMappingmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkComponentMappinginstance allocated on the specifiedMemoryStack.static intna(long struct)Unsafe version ofa().static voidna(long struct, int value)Unsafe version ofa.static intnb(long struct)Unsafe version ofb().static voidnb(long struct, int value)Unsafe version ofb.static intng(long struct)Unsafe version ofg().static voidng(long struct, int value)Unsafe version ofg.static intnr(long struct)Unsafe version ofr().static voidnr(long struct, int value)Unsafe version ofr.intr()Returns the value of therfield.VkComponentMappingr(int value)Sets the specified value to therfield.VkComponentMappingset(int r, int g, int b, int a)Initializes this struct with the specified values.VkComponentMappingset(VkComponentMapping src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
VkComponentMapping
public VkComponentMapping(java.nio.ByteBuffer container)
Creates aVkComponentMappinginstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
r
public int r()
Returns the value of therfield.
-
g
public int g()
Returns the value of thegfield.
-
b
public int b()
Returns the value of thebfield.
-
a
public int a()
Returns the value of theafield.
-
r
public VkComponentMapping r(int value)
Sets the specified value to therfield.
-
g
public VkComponentMapping g(int value)
Sets the specified value to thegfield.
-
b
public VkComponentMapping b(int value)
Sets the specified value to thebfield.
-
a
public VkComponentMapping a(int value)
Sets the specified value to theafield.
-
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 newVkComponentMappinginstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkComponentMapping calloc()
Returns a newVkComponentMappinginstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkComponentMapping create()
Returns a newVkComponentMappinginstance allocated withBufferUtils.
-
create
public static VkComponentMapping create(long address)
Returns a newVkComponentMappinginstance for the specified memory address.
-
createSafe
@Nullable public static VkComponentMapping createSafe(long address)
-
malloc
public static VkComponentMapping.Buffer malloc(int capacity)
Returns a newVkComponentMapping.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkComponentMapping.Buffer calloc(int capacity)
Returns a newVkComponentMapping.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkComponentMapping.Buffer create(int capacity)
Returns a newVkComponentMapping.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkComponentMapping.Buffer create(long address, int capacity)
Create aVkComponentMapping.Bufferinstance 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 newVkComponentMappinginstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkComponentMapping callocStack()
Returns a newVkComponentMappinginstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkComponentMapping mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComponentMappinginstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkComponentMapping callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComponentMappinginstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkComponentMapping.Buffer callocStack(int capacity)
Returns a newVkComponentMapping.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-