![]() |
CUGL 4.0
Cornell University Game Library
|
#include <CUGraphicsBase.h>
Public Member Functions | |
| BlendState () | |
| BlendState (BlendMode mode) | |
| BlendState (const BlendState &state) | |
| BlendState & | set (BlendMode mode) |
| BlendState & | operator= (BlendMode mode) |
| BlendState & | operator= (const BlendState &state) |
| bool | operator== (const BlendState &state) const noexcept |
| bool | operator!= (const BlendState &state) const noexcept |
| size_t | hash () |
Public Attributes | |
| BlendFactor | srcFactor |
| BlendFactor | dstFactor |
| BlendFactor | srcAlphaFactor |
| BlendFactor | dstAlphaFactor |
| BlendEq | colorEq |
| BlendEq | alphaEq |
| Color4f | color |
This class represents the state of the current color blending operations
This class is used for fine-tuned control of the color blending. For most application BlendMode should be adequate. Note that changing any of these values in Vulkans requires a pipeline swap.
| cugl::graphics::BlendState::BlendState | ( | ) |
Creates default color blend.
| cugl::graphics::BlendState::BlendState | ( | BlendMode | mode | ) |
Creates a color blend for the given mode
| mode | The color blend mode |
| cugl::graphics::BlendState::BlendState | ( | const BlendState & | state | ) |
Creates a copy of the given color blend
| state | The color blend to copy |
| size_t cugl::graphics::BlendState::hash | ( | ) |
Returns a hash code for this object.
This hash is used to manage pipeline swaps in Vulkan. It has no use in OpenGL.
|
noexcept |
Returns true if the given color blend is not equal to this object
| state | The color blend to compare |
| BlendState & cugl::graphics::BlendState::operator= | ( | BlendMode | mode | ) |
Assigns this object to be equivalent to the given color blend mode.
| mode | The color blend mode |
| BlendState & cugl::graphics::BlendState::operator= | ( | const BlendState & | state | ) |
Assigns this object to be a copy of the given color blend
| state | The color blend to copy |
|
noexcept |
Returns true if the given color blend is equal to this object
| state | The color blend to compare |
| BlendState & cugl::graphics::BlendState::set | ( | BlendMode | mode | ) |
Assigns this object to be equivalent to the given color blend mode.
| mode | The color blend mode |
| BlendEq cugl::graphics::BlendState::alphaEq |
The blend equation for the alpha value
| Color4f cugl::graphics::BlendState::color |
The constant color for this blend mode
| BlendEq cugl::graphics::BlendState::colorEq |
The blend equation for the RGB color values
| BlendFactor cugl::graphics::BlendState::dstAlphaFactor |
The blend factor for the destination alpha value
| BlendFactor cugl::graphics::BlendState::dstFactor |
The blend factor for the destination RGB color
| BlendFactor cugl::graphics::BlendState::srcAlphaFactor |
The blend factor for the source alpha value
| BlendFactor cugl::graphics::BlendState::srcFactor |
The blend factor for the source RGB color