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.NativeResourceStructure specifying a pipeline color blend attachment state.Valid Usage
- If the dual source blending feature is not enabled,
srcColorBlendFactormust 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,
dstColorBlendFactormust 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,
srcAlphaBlendFactormust 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,
dstAlphaBlendFactormust not beBLEND_FACTOR_SRC1_COLOR,BLEND_FACTOR_ONE_MINUS_SRC1_COLOR,BLEND_FACTOR_SRC1_ALPHA, orBLEND_FACTOR_ONE_MINUS_SRC1_ALPHA - If either of
colorBlendOporalphaBlendOpis an advanced blend operation, thencolorBlendOpmust equalalphaBlendOp - If
VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::advancedBlendIndependentBlendisFALSEandcolorBlendOpis an advanced blend operation, thencolorBlendOpmust be the same for all attachments. - If
VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::advancedBlendIndependentBlendisFALSEandalphaBlendOpis an advanced blend operation, thenalphaBlendOpmust be the same for all attachments. - If
VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::advancedBlendAllOperationsisFALSE, thencolorBlendOpmust 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
colorBlendOporalphaBlendOpis an advanced blend operation, thenVkSubpassDescription::colorAttachmentCountof the subpass this pipeline is compiled against must be less than or equal toVkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::advancedBlendMaxColorAttachments
Valid Usage (Implicit)
srcColorBlendFactormust be a validVkBlendFactorvaluedstColorBlendFactormust be a validVkBlendFactorvaluecolorBlendOpmust be a validVkBlendOpvaluesrcAlphaBlendFactormust be a validVkBlendFactorvaluedstAlphaBlendFactormust be a validVkBlendFactorvaluealphaBlendOpmust be a validVkBlendOpvaluecolorWriteMaskmust be a valid combination ofVkColorComponentFlagBitsvalues
See Also
VkPipelineColorBlendStateCreateInfoMember 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 ofVkColorComponentFlagBitsspecifying 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 classVkPipelineColorBlendAttachmentState.BufferAn array ofVkPipelineColorBlendAttachmentStatestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intALPHABLENDOP
BLENDENABLE
COLORBLENDOP
COLORWRITEMASK
DSTALPHABLENDFACTOR
DSTCOLORBLENDFACTORThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSRCALPHABLENDFACTOR
SRCCOLORBLENDFACTORThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkPipelineColorBlendAttachmentState(java.nio.ByteBuffer container)Creates aVkPipelineColorBlendAttachmentStateinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intalphaBlendOp()Returns the value of thealphaBlendOpfield.VkPipelineColorBlendAttachmentStatealphaBlendOp(int value)Sets the specified value to thealphaBlendOpfield.booleanblendEnable()Returns the value of theblendEnablefield.VkPipelineColorBlendAttachmentStateblendEnable(boolean value)Sets the specified value to theblendEnablefield.static VkPipelineColorBlendAttachmentStatecalloc()Returns a newVkPipelineColorBlendAttachmentStateinstance allocated withmemCalloc.static VkPipelineColorBlendAttachmentState.Buffercalloc(int capacity)Returns a newVkPipelineColorBlendAttachmentState.Bufferinstance allocated withmemCalloc.static VkPipelineColorBlendAttachmentStatecallocStack()Returns a newVkPipelineColorBlendAttachmentStateinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkPipelineColorBlendAttachmentState.BuffercallocStack(int capacity)Returns a newVkPipelineColorBlendAttachmentState.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkPipelineColorBlendAttachmentState.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineColorBlendAttachmentState.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPipelineColorBlendAttachmentStatecallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineColorBlendAttachmentStateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcolorBlendOp()Returns the value of thecolorBlendOpfield.VkPipelineColorBlendAttachmentStatecolorBlendOp(int value)Sets the specified value to thecolorBlendOpfield.intcolorWriteMask()Returns the value of thecolorWriteMaskfield.VkPipelineColorBlendAttachmentStatecolorWriteMask(int value)Sets the specified value to thecolorWriteMaskfield.static VkPipelineColorBlendAttachmentStatecreate()Returns a newVkPipelineColorBlendAttachmentStateinstance allocated withBufferUtils.static VkPipelineColorBlendAttachmentState.Buffercreate(int capacity)Returns a newVkPipelineColorBlendAttachmentState.Bufferinstance allocated withBufferUtils.static VkPipelineColorBlendAttachmentStatecreate(long address)Returns a newVkPipelineColorBlendAttachmentStateinstance for the specified memory address.static VkPipelineColorBlendAttachmentState.Buffercreate(long address, int capacity)Create aVkPipelineColorBlendAttachmentState.Bufferinstance at the specified memory.static VkPipelineColorBlendAttachmentStatecreateSafe(long address)static VkPipelineColorBlendAttachmentState.BuffercreateSafe(long address, int capacity)intdstAlphaBlendFactor()Returns the value of thedstAlphaBlendFactorfield.VkPipelineColorBlendAttachmentStatedstAlphaBlendFactor(int value)Sets the specified value to thedstAlphaBlendFactorfield.intdstColorBlendFactor()Returns the value of thedstColorBlendFactorfield.VkPipelineColorBlendAttachmentStatedstColorBlendFactor(int value)Sets the specified value to thedstColorBlendFactorfield.static VkPipelineColorBlendAttachmentStatemalloc()Returns a newVkPipelineColorBlendAttachmentStateinstance allocated withmemAlloc.static VkPipelineColorBlendAttachmentState.Buffermalloc(int capacity)Returns a newVkPipelineColorBlendAttachmentState.Bufferinstance allocated withmemAlloc.static VkPipelineColorBlendAttachmentStatemallocStack()Returns a newVkPipelineColorBlendAttachmentStateinstance allocated on the thread-localMemoryStack.static VkPipelineColorBlendAttachmentState.BuffermallocStack(int capacity)Returns a newVkPipelineColorBlendAttachmentState.Bufferinstance allocated on the thread-localMemoryStack.static VkPipelineColorBlendAttachmentState.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineColorBlendAttachmentState.Bufferinstance allocated on the specifiedMemoryStack.static VkPipelineColorBlendAttachmentStatemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineColorBlendAttachmentStateinstance allocated on the specifiedMemoryStack.static intnalphaBlendOp(long struct)Unsafe version ofalphaBlendOp().static voidnalphaBlendOp(long struct, int value)Unsafe version ofalphaBlendOp.static intnblendEnable(long struct)Unsafe version ofblendEnable().static voidnblendEnable(long struct, int value)Unsafe version ofblendEnable.static intncolorBlendOp(long struct)Unsafe version ofcolorBlendOp().static voidncolorBlendOp(long struct, int value)Unsafe version ofcolorBlendOp.static intncolorWriteMask(long struct)Unsafe version ofcolorWriteMask().static voidncolorWriteMask(long struct, int value)Unsafe version ofcolorWriteMask.static intndstAlphaBlendFactor(long struct)Unsafe version ofdstAlphaBlendFactor().static voidndstAlphaBlendFactor(long struct, int value)Unsafe version ofdstAlphaBlendFactor.static intndstColorBlendFactor(long struct)Unsafe version ofdstColorBlendFactor().static voidndstColorBlendFactor(long struct, int value)Unsafe version ofdstColorBlendFactor.static intnsrcAlphaBlendFactor(long struct)Unsafe version ofsrcAlphaBlendFactor().static voidnsrcAlphaBlendFactor(long struct, int value)Unsafe version ofsrcAlphaBlendFactor.static intnsrcColorBlendFactor(long struct)Unsafe version ofsrcColorBlendFactor().static voidnsrcColorBlendFactor(long struct, int value)Unsafe version ofsrcColorBlendFactor.VkPipelineColorBlendAttachmentStateset(boolean blendEnable, int srcColorBlendFactor, int dstColorBlendFactor, int colorBlendOp, int srcAlphaBlendFactor, int dstAlphaBlendFactor, int alphaBlendOp, int colorWriteMask)Initializes this struct with the specified values.VkPipelineColorBlendAttachmentStateset(VkPipelineColorBlendAttachmentState src)Copies the specified struct data to this struct.intsizeof()intsrcAlphaBlendFactor()Returns the value of thesrcAlphaBlendFactorfield.VkPipelineColorBlendAttachmentStatesrcAlphaBlendFactor(int value)Sets the specified value to thesrcAlphaBlendFactorfield.intsrcColorBlendFactor()Returns the value of thesrcColorBlendFactorfield.VkPipelineColorBlendAttachmentStatesrcColorBlendFactor(int value)Sets the specified value to thesrcColorBlendFactorfield.
-
-
-
Constructor Detail
-
VkPipelineColorBlendAttachmentState
public VkPipelineColorBlendAttachmentState(java.nio.ByteBuffer container)
Creates aVkPipelineColorBlendAttachmentStateinstance 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
-
blendEnable
public boolean blendEnable()
Returns the value of theblendEnablefield.
-
srcColorBlendFactor
public int srcColorBlendFactor()
Returns the value of thesrcColorBlendFactorfield.
-
dstColorBlendFactor
public int dstColorBlendFactor()
Returns the value of thedstColorBlendFactorfield.
-
colorBlendOp
public int colorBlendOp()
Returns the value of thecolorBlendOpfield.
-
srcAlphaBlendFactor
public int srcAlphaBlendFactor()
Returns the value of thesrcAlphaBlendFactorfield.
-
dstAlphaBlendFactor
public int dstAlphaBlendFactor()
Returns the value of thedstAlphaBlendFactorfield.
-
alphaBlendOp
public int alphaBlendOp()
Returns the value of thealphaBlendOpfield.
-
colorWriteMask
public int colorWriteMask()
Returns the value of thecolorWriteMaskfield.
-
blendEnable
public VkPipelineColorBlendAttachmentState blendEnable(boolean value)
Sets the specified value to theblendEnablefield.
-
srcColorBlendFactor
public VkPipelineColorBlendAttachmentState srcColorBlendFactor(int value)
Sets the specified value to thesrcColorBlendFactorfield.
-
dstColorBlendFactor
public VkPipelineColorBlendAttachmentState dstColorBlendFactor(int value)
Sets the specified value to thedstColorBlendFactorfield.
-
colorBlendOp
public VkPipelineColorBlendAttachmentState colorBlendOp(int value)
Sets the specified value to thecolorBlendOpfield.
-
srcAlphaBlendFactor
public VkPipelineColorBlendAttachmentState srcAlphaBlendFactor(int value)
Sets the specified value to thesrcAlphaBlendFactorfield.
-
dstAlphaBlendFactor
public VkPipelineColorBlendAttachmentState dstAlphaBlendFactor(int value)
Sets the specified value to thedstAlphaBlendFactorfield.
-
alphaBlendOp
public VkPipelineColorBlendAttachmentState alphaBlendOp(int value)
Sets the specified value to thealphaBlendOpfield.
-
colorWriteMask
public VkPipelineColorBlendAttachmentState colorWriteMask(int value)
Sets the specified value to thecolorWriteMaskfield.
-
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 newVkPipelineColorBlendAttachmentStateinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkPipelineColorBlendAttachmentState calloc()
Returns a newVkPipelineColorBlendAttachmentStateinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkPipelineColorBlendAttachmentState create()
Returns a newVkPipelineColorBlendAttachmentStateinstance allocated withBufferUtils.
-
create
public static VkPipelineColorBlendAttachmentState create(long address)
Returns a newVkPipelineColorBlendAttachmentStateinstance for the specified memory address.
-
createSafe
@Nullable public static VkPipelineColorBlendAttachmentState createSafe(long address)
-
malloc
public static VkPipelineColorBlendAttachmentState.Buffer malloc(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkPipelineColorBlendAttachmentState.Buffer calloc(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkPipelineColorBlendAttachmentState.Buffer create(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkPipelineColorBlendAttachmentState.Buffer create(long address, int capacity)
Create aVkPipelineColorBlendAttachmentState.Bufferinstance 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 newVkPipelineColorBlendAttachmentStateinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkPipelineColorBlendAttachmentState callocStack()
Returns a newVkPipelineColorBlendAttachmentStateinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkPipelineColorBlendAttachmentState mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentStateinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkPipelineColorBlendAttachmentState callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineColorBlendAttachmentStateinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkPipelineColorBlendAttachmentState.Buffer callocStack(int capacity)
Returns a newVkPipelineColorBlendAttachmentState.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-