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
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkPipelineColorBlendAttachmentState extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying a pipeline color blend attachment state.Valid Usage
- 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
- If either of
colorBlendOp
oralphaBlendOp
is an advanced blend operation, thencolorBlendOp
must equalalphaBlendOp
- If
VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT
::advancedBlendIndependentBlend
isFALSE
andcolorBlendOp
is an advanced blend operation, thencolorBlendOp
must be the same for all attachments. - If
VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT
::advancedBlendIndependentBlend
isFALSE
andalphaBlendOp
is an advanced blend operation, thenalphaBlendOp
must be the same for all attachments. - If
VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT
::advancedBlendAllOperations
isFALSE
, thencolorBlendOp
must not beBLEND_OP_ZERO_EXT
,BLEND_OP_SRC_EXT
,BLEND_OP_DST_EXT
,BLEND_OP_SRC_OVER_EXT
,BLEND_OP_DST_OVER_EXT
,BLEND_OP_SRC_IN_EXT
,BLEND_OP_DST_IN_EXT
,BLEND_OP_SRC_OUT_EXT
,BLEND_OP_DST_OUT_EXT
,BLEND_OP_SRC_ATOP_EXT
,BLEND_OP_DST_ATOP_EXT
,BLEND_OP_XOR_EXT
,BLEND_OP_INVERT_EXT
,BLEND_OP_INVERT_RGB_EXT
,BLEND_OP_LINEARDODGE_EXT
,BLEND_OP_LINEARBURN_EXT
,BLEND_OP_VIVIDLIGHT_EXT
,BLEND_OP_LINEARLIGHT_EXT
,BLEND_OP_PINLIGHT_EXT
,BLEND_OP_HARDMIX_EXT
,BLEND_OP_PLUS_EXT
,BLEND_OP_PLUS_CLAMPED_EXT
,BLEND_OP_PLUS_CLAMPED_ALPHA_EXT
,BLEND_OP_PLUS_DARKER_EXT
,BLEND_OP_MINUS_EXT
,BLEND_OP_MINUS_CLAMPED_EXT
,BLEND_OP_CONTRAST_EXT
,BLEND_OP_INVERT_OVG_EXT
,BLEND_OP_RED_EXT
,BLEND_OP_GREEN_EXT
, orBLEND_OP_BLUE_EXT
- If
colorBlendOp
oralphaBlendOp
is an advanced blend operation, thenVkSubpassDescription
::colorAttachmentCount
of the subpass this pipeline is compiled against must be less than or equal toVkPhysicalDeviceBlendOperationAdvancedPropertiesEXT
::advancedBlendMaxColorAttachments
Valid Usage (Implicit)
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
See Also
VkPipelineColorBlendStateCreateInfo
Member documentation
blendEnable
– controls whether blending is enabled for the corresponding color attachment. If blending is not enabled, the source fragment’s color for that attachment is passed through unmodified.srcColorBlendFactor
– selects which blend factor is used to determine the source factors(Sr,Sg,Sb)
.dstColorBlendFactor
– selects which blend factor is used to determine the destination factors(Dr,Dg,Db)
.colorBlendOp
– selects which blend operation is used to calculate the RGB values to write to the color attachment.srcAlphaBlendFactor
– selects which blend factor is used to determine the source factorSa
.dstAlphaBlendFactor
– selects which blend factor is used to determine the destination factorDa
.alphaBlendOp
– selects which blend operation is use to calculate the alpha values to write to the color attachment.colorWriteMask
– a bitmask ofVkColorComponentFlagBits
specifying which of the R, G, B, and/or A components are enabled for writing, as described for the Color Write Mask.
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 Description static class
VkPipelineColorBlendAttachmentState.Buffer
An array ofVkPipelineColorBlendAttachmentState
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ALPHABLENDOP
BLENDENABLE
COLORBLENDOP
COLORWRITEMASK
DSTALPHABLENDFACTOR
DSTCOLORBLENDFACTORThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
SRCALPHABLENDFACTOR
SRCCOLORBLENDFACTORThe struct member offsets.
-
Constructor Summary
Constructors Constructor 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 Description int
alphaBlendOp()
Returns the value of thealphaBlendOp
field.VkPipelineColorBlendAttachmentState
alphaBlendOp(int value)
Sets the specified value to thealphaBlendOp
field.boolean
blendEnable()
Returns the value of theblendEnable
field.VkPipelineColorBlendAttachmentState
blendEnable(boolean 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, org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPipelineColorBlendAttachmentState
callocStack(org.lwjgl.system.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.static VkPipelineColorBlendAttachmentState.Buffer
create(long address, int capacity)
Create aVkPipelineColorBlendAttachmentState.Buffer
instance at the specified memory.static VkPipelineColorBlendAttachmentState
createSafe(long address)
static VkPipelineColorBlendAttachmentState.Buffer
createSafe(long address, int capacity)
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, org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState.Buffer
instance allocated on the specifiedMemoryStack
.static VkPipelineColorBlendAttachmentState
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState
instance allocated on the specifiedMemoryStack
.static int
nalphaBlendOp(long struct)
Unsafe version ofalphaBlendOp()
.static void
nalphaBlendOp(long struct, int value)
Unsafe version ofalphaBlendOp
.static int
nblendEnable(long struct)
Unsafe version ofblendEnable()
.static void
nblendEnable(long struct, int value)
Unsafe version ofblendEnable
.static int
ncolorBlendOp(long struct)
Unsafe version ofcolorBlendOp()
.static void
ncolorBlendOp(long struct, int value)
Unsafe version ofcolorBlendOp
.static int
ncolorWriteMask(long struct)
Unsafe version ofcolorWriteMask()
.static void
ncolorWriteMask(long struct, int value)
Unsafe version ofcolorWriteMask
.static int
ndstAlphaBlendFactor(long struct)
Unsafe version ofdstAlphaBlendFactor()
.static void
ndstAlphaBlendFactor(long struct, int value)
Unsafe version ofdstAlphaBlendFactor
.static int
ndstColorBlendFactor(long struct)
Unsafe version ofdstColorBlendFactor()
.static void
ndstColorBlendFactor(long struct, int value)
Unsafe version ofdstColorBlendFactor
.static int
nsrcAlphaBlendFactor(long struct)
Unsafe version ofsrcAlphaBlendFactor()
.static void
nsrcAlphaBlendFactor(long struct, int value)
Unsafe version ofsrcAlphaBlendFactor
.static int
nsrcColorBlendFactor(long struct)
Unsafe version ofsrcColorBlendFactor()
.static void
nsrcColorBlendFactor(long struct, int value)
Unsafe version ofsrcColorBlendFactor
.VkPipelineColorBlendAttachmentState
set(boolean 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()
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.
-
-
-
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
blendEnable
public boolean 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(boolean 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(boolean blendEnable, int srcColorBlendFactor, int dstColorBlendFactor, int colorBlendOp, int srcAlphaBlendFactor, int dstAlphaBlendFactor, int alphaBlendOp, int colorWriteMask)
Initializes this struct with the specified values.
-
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.
-
createSafe
@Nullable public static VkPipelineColorBlendAttachmentState createSafe(long address)
-
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
-
createSafe
@Nullable public static VkPipelineColorBlendAttachmentState.Buffer createSafe(long address, int 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(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentState
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkPipelineColorBlendAttachmentState callocStack(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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
-
nblendEnable
public static int nblendEnable(long struct)
Unsafe version ofblendEnable()
.
-
nsrcColorBlendFactor
public static int nsrcColorBlendFactor(long struct)
Unsafe version ofsrcColorBlendFactor()
.
-
ndstColorBlendFactor
public static int ndstColorBlendFactor(long struct)
Unsafe version ofdstColorBlendFactor()
.
-
ncolorBlendOp
public static int ncolorBlendOp(long struct)
Unsafe version ofcolorBlendOp()
.
-
nsrcAlphaBlendFactor
public static int nsrcAlphaBlendFactor(long struct)
Unsafe version ofsrcAlphaBlendFactor()
.
-
ndstAlphaBlendFactor
public static int ndstAlphaBlendFactor(long struct)
Unsafe version ofdstAlphaBlendFactor()
.
-
nalphaBlendOp
public static int nalphaBlendOp(long struct)
Unsafe version ofalphaBlendOp()
.
-
ncolorWriteMask
public static int ncolorWriteMask(long struct)
Unsafe version ofcolorWriteMask()
.
-
nblendEnable
public static void nblendEnable(long struct, int value)
Unsafe version ofblendEnable
.
-
nsrcColorBlendFactor
public static void nsrcColorBlendFactor(long struct, int value)
Unsafe version ofsrcColorBlendFactor
.
-
ndstColorBlendFactor
public static void ndstColorBlendFactor(long struct, int value)
Unsafe version ofdstColorBlendFactor
.
-
ncolorBlendOp
public static void ncolorBlendOp(long struct, int value)
Unsafe version ofcolorBlendOp
.
-
nsrcAlphaBlendFactor
public static void nsrcAlphaBlendFactor(long struct, int value)
Unsafe version ofsrcAlphaBlendFactor
.
-
ndstAlphaBlendFactor
public static void ndstAlphaBlendFactor(long struct, int value)
Unsafe version ofdstAlphaBlendFactor
.
-
nalphaBlendOp
public static void nalphaBlendOp(long struct, int value)
Unsafe version ofalphaBlendOp
.
-
ncolorWriteMask
public static void ncolorWriteMask(long struct, int value)
Unsafe version ofcolorWriteMask
.
-
-