Package org.lwjgl.vulkan
Class VkPipelineColorBlendAttachmentState
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkPipelineColorBlendAttachmentState
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkPipelineColorBlendAttachmentState extends Struct
Khronos Reference Page
Vulkan SpecificationContains information about per-target blending state as part of graphics pipeline creation.
Valid Usage
srcColorBlendFactor
must be a validVkBlendFactor
valuedstColorBlendFactor
must be a validVkBlendFactor
valuecolorBlendOp
must be a validVkBlendOp
valuesrcAlphaBlendFactor
must be a validVkBlendFactor
valuedstAlphaBlendFactor
must be a validVkBlendFactor
valuealphaBlendOp
must be a validVkBlendOp
valuecolorWriteMask
must be a valid combination ofVkColorComponentFlagBits
values- If the dual source blending feature is not enabled,
srcColorBlendFactor
must not beBLEND_FACTOR_SRC1_COLOR
,BLEND_FACTOR_ONE_MINUS_SRC1_COLOR
,BLEND_FACTOR_SRC1_ALPHA
, orBLEND_FACTOR_ONE_MINUS_SRC1_ALPHA
- If the dual source blending feature is not enabled,
dstColorBlendFactor
must not beBLEND_FACTOR_SRC1_COLOR
,BLEND_FACTOR_ONE_MINUS_SRC1_COLOR
,BLEND_FACTOR_SRC1_ALPHA
, orBLEND_FACTOR_ONE_MINUS_SRC1_ALPHA
- If the dual source blending feature is not enabled,
srcAlphaBlendFactor
must not beBLEND_FACTOR_SRC1_COLOR
,BLEND_FACTOR_ONE_MINUS_SRC1_COLOR
,BLEND_FACTOR_SRC1_ALPHA
, orBLEND_FACTOR_ONE_MINUS_SRC1_ALPHA
- If the dual source blending feature is not enabled,
dstAlphaBlendFactor
must not beBLEND_FACTOR_SRC1_COLOR
,BLEND_FACTOR_ONE_MINUS_SRC1_COLOR
,BLEND_FACTOR_SRC1_ALPHA
, orBLEND_FACTOR_ONE_MINUS_SRC1_ALPHA
Member documentation
blendEnable
– controls whether blending is enabled for the corresponding color attachmentsrcColorBlendFactor
– selects which blend factor is used to determine the source factors Sr,Sg,Sb. One of:dstColorBlendFactor
– selects which blend factor is used to determine the destination factors Dr,Dg,DbcolorBlendOp
– selects which blend operation is used to calculate the RGB values to write to the color attachment. One of:BLEND_OP_ADD
BLEND_OP_MAX
BLEND_OP_MIN
BLEND_OP_REVERSE_SUBTRACT
BLEND_OP_SUBTRACT
srcAlphaBlendFactor
– selects which blend factor is used to determine the source factor SadstAlphaBlendFactor
– selects which blend factor is used to determine the destination factor DaalphaBlendOp
– selects which blend operation is use to calculate the alpha values to write to the color attachmentcolorWriteMask
– a bitmask selecting which of the R, G, B, and/or A components are enabled for writing. One or more of:COLOR_COMPONENT_A_BIT
COLOR_COMPONENT_B_BIT
COLOR_COMPONENT_G_BIT
COLOR_COMPONENT_R_BIT
Layout
struct VkPipelineColorBlendAttachmentState { VkBool32 blendEnable; VkBlendFactor srcColorBlendFactor; VkBlendFactor dstColorBlendFactor; VkBlendOp colorBlendOp; VkBlendFactor srcAlphaBlendFactor; VkBlendFactor dstAlphaBlendFactor; VkBlendOp alphaBlendOp; VkColorComponentFlags colorWriteMask; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkPipelineColorBlendAttachmentState.Buffer
An array ofVkPipelineColorBlendAttachmentState
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 VkPipelineColorBlendAttachmentState(java.nio.ByteBuffer container)
Creates aVkPipelineColorBlendAttachmentState
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
alphaBlendOp()
Returns the value of thealphaBlendOp
field.VkPipelineColorBlendAttachmentState
alphaBlendOp(int value)
Sets the specified value to thealphaBlendOp
field.int
blendEnable()
Returns the value of theblendEnable
field.VkPipelineColorBlendAttachmentState
blendEnable(int value)
Sets the specified value to theblendEnable
field.static VkPipelineColorBlendAttachmentState
calloc()
Returns a newVkPipelineColorBlendAttachmentState
instance allocated withmemCalloc
.static VkPipelineColorBlendAttachmentState.Buffer
calloc(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated withmemCalloc
.static VkPipelineColorBlendAttachmentState
callocStack()
Returns a newVkPipelineColorBlendAttachmentState
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPipelineColorBlendAttachmentState.Buffer
callocStack(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPipelineColorBlendAttachmentState.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPipelineColorBlendAttachmentState
callocStack(MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
colorBlendOp()
Returns the value of thecolorBlendOp
field.VkPipelineColorBlendAttachmentState
colorBlendOp(int value)
Sets the specified value to thecolorBlendOp
field.int
colorWriteMask()
Returns the value of thecolorWriteMask
field.VkPipelineColorBlendAttachmentState
colorWriteMask(int value)
Sets the specified value to thecolorWriteMask
field.static VkPipelineColorBlendAttachmentState
create()
Returns a newVkPipelineColorBlendAttachmentState
instance allocated withBufferUtils
.static VkPipelineColorBlendAttachmentState.Buffer
create(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated withBufferUtils
.static VkPipelineColorBlendAttachmentState
create(long address)
Returns a newVkPipelineColorBlendAttachmentState
instance for the specified memory address ornull
if the address isNULL
.static VkPipelineColorBlendAttachmentState.Buffer
create(long address, int capacity)
Create aVkPipelineColorBlendAttachmentState.Buffer
instance at the specified memory.int
dstAlphaBlendFactor()
Returns the value of thedstAlphaBlendFactor
field.VkPipelineColorBlendAttachmentState
dstAlphaBlendFactor(int value)
Sets the specified value to thedstAlphaBlendFactor
field.int
dstColorBlendFactor()
Returns the value of thedstColorBlendFactor
field.VkPipelineColorBlendAttachmentState
dstColorBlendFactor(int value)
Sets the specified value to thedstColorBlendFactor
field.static VkPipelineColorBlendAttachmentState
malloc()
Returns a newVkPipelineColorBlendAttachmentState
instance allocated withmemAlloc
.static VkPipelineColorBlendAttachmentState.Buffer
malloc(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated withmemAlloc
.static VkPipelineColorBlendAttachmentState
mallocStack()
Returns a newVkPipelineColorBlendAttachmentState
instance allocated on the thread-localMemoryStack
.static VkPipelineColorBlendAttachmentState.Buffer
mallocStack(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated on the thread-localMemoryStack
.static VkPipelineColorBlendAttachmentState.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated on the specifiedMemoryStack
.static VkPipelineColorBlendAttachmentState
mallocStack(MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState
instance allocated on the specifiedMemoryStack
.VkPipelineColorBlendAttachmentState
nset(long struct)
Unsafe version ofset
.VkPipelineColorBlendAttachmentState
set(int blendEnable, int srcColorBlendFactor, int dstColorBlendFactor, int colorBlendOp, int srcAlphaBlendFactor, int dstAlphaBlendFactor, int alphaBlendOp, int colorWriteMask)
Initializes this struct with the specified values.VkPipelineColorBlendAttachmentState
set(VkPipelineColorBlendAttachmentState src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
srcAlphaBlendFactor()
Returns the value of thesrcAlphaBlendFactor
field.VkPipelineColorBlendAttachmentState
srcAlphaBlendFactor(int value)
Sets the specified value to thesrcAlphaBlendFactor
field.int
srcColorBlendFactor()
Returns the value of thesrcColorBlendFactor
field.VkPipelineColorBlendAttachmentState
srcColorBlendFactor(int value)
Sets the specified value to thesrcColorBlendFactor
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkPipelineColorBlendAttachmentState
public VkPipelineColorBlendAttachmentState(java.nio.ByteBuffer container)
Creates aVkPipelineColorBlendAttachmentState
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)
.
-
blendEnable
public int blendEnable()
Returns the value of theblendEnable
field.
-
srcColorBlendFactor
public int srcColorBlendFactor()
Returns the value of thesrcColorBlendFactor
field.
-
dstColorBlendFactor
public int dstColorBlendFactor()
Returns the value of thedstColorBlendFactor
field.
-
colorBlendOp
public int colorBlendOp()
Returns the value of thecolorBlendOp
field.
-
srcAlphaBlendFactor
public int srcAlphaBlendFactor()
Returns the value of thesrcAlphaBlendFactor
field.
-
dstAlphaBlendFactor
public int dstAlphaBlendFactor()
Returns the value of thedstAlphaBlendFactor
field.
-
alphaBlendOp
public int alphaBlendOp()
Returns the value of thealphaBlendOp
field.
-
colorWriteMask
public int colorWriteMask()
Returns the value of thecolorWriteMask
field.
-
blendEnable
public VkPipelineColorBlendAttachmentState blendEnable(int value)
Sets the specified value to theblendEnable
field.
-
srcColorBlendFactor
public VkPipelineColorBlendAttachmentState srcColorBlendFactor(int value)
Sets the specified value to thesrcColorBlendFactor
field.
-
dstColorBlendFactor
public VkPipelineColorBlendAttachmentState dstColorBlendFactor(int value)
Sets the specified value to thedstColorBlendFactor
field.
-
colorBlendOp
public VkPipelineColorBlendAttachmentState colorBlendOp(int value)
Sets the specified value to thecolorBlendOp
field.
-
srcAlphaBlendFactor
public VkPipelineColorBlendAttachmentState srcAlphaBlendFactor(int value)
Sets the specified value to thesrcAlphaBlendFactor
field.
-
dstAlphaBlendFactor
public VkPipelineColorBlendAttachmentState dstAlphaBlendFactor(int value)
Sets the specified value to thedstAlphaBlendFactor
field.
-
alphaBlendOp
public VkPipelineColorBlendAttachmentState alphaBlendOp(int value)
Sets the specified value to thealphaBlendOp
field.
-
colorWriteMask
public VkPipelineColorBlendAttachmentState colorWriteMask(int value)
Sets the specified value to thecolorWriteMask
field.
-
set
public VkPipelineColorBlendAttachmentState set(int blendEnable, int srcColorBlendFactor, int dstColorBlendFactor, int colorBlendOp, int srcAlphaBlendFactor, int dstAlphaBlendFactor, int alphaBlendOp, int colorWriteMask)
Initializes this struct with the specified values.
-
nset
public VkPipelineColorBlendAttachmentState nset(long struct)
Unsafe version ofset
.
-
set
public VkPipelineColorBlendAttachmentState set(VkPipelineColorBlendAttachmentState src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkPipelineColorBlendAttachmentState malloc()
Returns a newVkPipelineColorBlendAttachmentState
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkPipelineColorBlendAttachmentState calloc()
Returns a newVkPipelineColorBlendAttachmentState
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkPipelineColorBlendAttachmentState create()
Returns a newVkPipelineColorBlendAttachmentState
instance allocated withBufferUtils
.
-
create
public static VkPipelineColorBlendAttachmentState create(long address)
Returns a newVkPipelineColorBlendAttachmentState
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkPipelineColorBlendAttachmentState.Buffer malloc(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkPipelineColorBlendAttachmentState.Buffer calloc(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPipelineColorBlendAttachmentState.Buffer create(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPipelineColorBlendAttachmentState.Buffer create(long address, int capacity)
Create aVkPipelineColorBlendAttachmentState.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkPipelineColorBlendAttachmentState mallocStack()
Returns a newVkPipelineColorBlendAttachmentState
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkPipelineColorBlendAttachmentState callocStack()
Returns a newVkPipelineColorBlendAttachmentState
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkPipelineColorBlendAttachmentState mallocStack(MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkPipelineColorBlendAttachmentState callocStack(MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkPipelineColorBlendAttachmentState.Buffer mallocStack(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkPipelineColorBlendAttachmentState.Buffer callocStack(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkPipelineColorBlendAttachmentState.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkPipelineColorBlendAttachmentState.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-