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, NativeResource, Pointer
public class VkComponentMapping extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes a remapping from components of the image to components of the vector returned by shader image instructions.
Valid Usage
rmust be a validVkComponentSwizzlevaluegmust be a validVkComponentSwizzlevaluebmust be a validVkComponentSwizzlevalueamust be a validVkComponentSwizzlevalue
Member documentation
r– the value placed in the r component of the output vector. One of:COMPONENT_SWIZZLE_ACOMPONENT_SWIZZLE_BCOMPONENT_SWIZZLE_GCOMPONENT_SWIZZLE_IDENTITYCOMPONENT_SWIZZLE_ONECOMPONENT_SWIZZLE_RCOMPONENT_SWIZZLE_ZEROg– the value placed in the g component of the output vectorb– the value placed in the b component of the output vectora– the 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 and Description static classVkComponentMapping.BufferAn array ofVkComponentMappingstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and 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 and 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, MemoryStack stack)Returns a newVkComponentMapping.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkComponentMappingcallocStack(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 ornullif the address isNULL.static VkComponentMapping.Buffercreate(long address, int capacity)Create aVkComponentMapping.Bufferinstance at the specified memory.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, MemoryStack stack)Returns a newVkComponentMapping.Bufferinstance allocated on the specifiedMemoryStack.static VkComponentMappingmallocStack(MemoryStack stack)Returns a newVkComponentMappinginstance allocated on the specifiedMemoryStack.VkComponentMappingnset(long struct)Unsafe version ofset.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()Returns thesizeof(struct).-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:StructReturns thesizeof(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.
-
nset
public VkComponentMapping nset(long struct)
Unsafe version ofset.
-
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 ornullif the address isNULL.
-
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
-
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(MemoryStack stack)
Returns a newVkComponentMappinginstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkComponentMapping callocStack(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, 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, 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
-
-