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
r
must be a validVkComponentSwizzle
valueg
must be a validVkComponentSwizzle
valueb
must be a validVkComponentSwizzle
valuea
must be a validVkComponentSwizzle
value
Member documentation
r
– the value placed in the r component of the output vector. One of:COMPONENT_SWIZZLE_A
COMPONENT_SWIZZLE_B
COMPONENT_SWIZZLE_G
COMPONENT_SWIZZLE_IDENTITY
COMPONENT_SWIZZLE_ONE
COMPONENT_SWIZZLE_R
COMPONENT_SWIZZLE_ZERO
g
– 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 class
VkComponentMapping.Buffer
An array ofVkComponentMapping
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 aVkComponentMapping
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and 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, MemoryStack stack)
Returns a newVkComponentMapping.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkComponentMapping
callocStack(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 ornull
if the address isNULL
.static VkComponentMapping.Buffer
create(long address, int capacity)
Create aVkComponentMapping.Buffer
instance at the specified memory.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, MemoryStack stack)
Returns a newVkComponentMapping.Buffer
instance allocated on the specifiedMemoryStack
.static VkComponentMapping
mallocStack(MemoryStack stack)
Returns a newVkComponentMapping
instance allocated on the specifiedMemoryStack
.VkComponentMapping
nset(long struct)
Unsafe version ofset
.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()
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 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()
Description copied from class:Struct
Returns thesizeof(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.
-
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 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 ornull
if the address isNULL
.
-
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
-
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(MemoryStack stack)
Returns a newVkComponentMapping
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkComponentMapping callocStack(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, 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, 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
-
-