FastUIDraw
|
Class to hold the blend mode as exposed by typical 3D APIs. More...
#include <blend_mode.hpp>
Public Types | |
enum | equation_t { ADD, SUBTRACT, REVERSE_SUBTRACT, MIN, MAX, NUMBER_OPS } |
Enumeration to specify blend equation, i.e. glBlendEquation. More... | |
enum | func_t { ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR, SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR, CONSTANT_ALPHA, ONE_MINUS_CONSTANT_ALPHA, SRC_ALPHA_SATURATE, SRC1_COLOR, ONE_MINUS_SRC1_COLOR, SRC1_ALPHA, ONE_MINUS_SRC1_ALPHA, NUMBER_FUNCS } |
Enumeration to specify the blend coefficient factor, i.e. glBlendFunc. More... | |
Public Member Functions | |
BlendMode (void) | |
BlendMode & | blending_on (bool v) |
bool | blending_on (void) const |
BlendMode & | equation (enum equation_t v) |
BlendMode & | equation_alpha (enum equation_t v) |
enum equation_t | equation_alpha (void) const |
BlendMode & | equation_rgb (enum equation_t v) |
enum equation_t | equation_rgb (void) const |
BlendMode & | func (enum func_t src, enum func_t dst) |
BlendMode & | func_dst (enum func_t v) |
BlendMode & | func_dst_alpha (enum func_t v) |
enum func_t | func_dst_alpha (void) const |
enum func_t | func_dst_rgb (void) const |
BlendMode & | func_dst_rgb (enum func_t v) |
BlendMode & | func_src (enum func_t v) |
BlendMode & | func_src_alpha (enum func_t v) |
enum func_t | func_src_alpha (void) const |
enum func_t | func_src_rgb (void) const |
BlendMode & | func_src_rgb (enum func_t v) |
bool | is_valid (void) const |
bool | operator!= (BlendMode rhs) const |
bool | operator== (BlendMode rhs) const |
BlendMode & | set_as_invalid (void) |
BlendMode & | set_as_valid (void) |
Static Public Member Functions | |
static c_string | label (enum equation_t v) |
static c_string | label (enum func_t v) |
Class to hold the blend mode as exposed by typical 3D APIs.
Definition at line 37 of file blend_mode.hpp.
Enumeration to specify blend equation, i.e. glBlendEquation.
Definition at line 44 of file blend_mode.hpp.
Enumeration to specify the blend coefficient factor, i.e. glBlendFunc.
Definition at line 79 of file blend_mode.hpp.
|
inline |
Ctor. Initializes as valid with blending on, with blend equation as add in all channels, with src func in all channels as ONE and dest func in all channels as ZERO.
Definition at line 215 of file blend_mode.hpp.
|
inline |
Set that 3D API blending is on or off. Default value is true.
Definition at line 279 of file blend_mode.hpp.
|
inline |
Return the value as set by blending_on(bool).
Definition at line 290 of file blend_mode.hpp.
|
inline |
Provided as a conveniance, equivalent to
Definition at line 345 of file blend_mode.hpp.
|
inline |
Set the blend equation for the Alpha channel. Default value is ADD.
Definition at line 321 of file blend_mode.hpp.
|
inline |
Return the value as set by equation_alpha(enum equation_t).
Definition at line 332 of file blend_mode.hpp.
|
inline |
Return the value as set by equation_rgb(enum equation_t).
Definition at line 311 of file blend_mode.hpp.
|
inline |
Set the blend equation for the RGB channels. Default value is ADD.
Definition at line 300 of file blend_mode.hpp.
Provided as a conveniance, equivalent to
Definition at line 471 of file blend_mode.hpp.
Provided as a conveniance, equivalent to
Definition at line 457 of file blend_mode.hpp.
Set the destication coefficient for the Alpha channel. Default value is ZERO.
Definition at line 433 of file blend_mode.hpp.
|
inline |
Return the value as set by func_dst_alpha(enum t).
Definition at line 444 of file blend_mode.hpp.
|
inline |
Return the value as set by func_dst_rgb(enum t).
Definition at line 423 of file blend_mode.hpp.
Set the destication coefficient for the RGB channels. Default value is ZERO.
Definition at line 412 of file blend_mode.hpp.
Provided as a conveniance, equivalent to
Definition at line 401 of file blend_mode.hpp.
|
inline |
Return the value as set by func_src_alpha(enum t).
Definition at line 388 of file blend_mode.hpp.
Set the source coefficient for the Alpha channel. Default value is ONE.
Definition at line 377 of file blend_mode.hpp.
Set the source coefficient for the RGB channels. Default value is ONE.
Definition at line 356 of file blend_mode.hpp.
|
inline |
Return the value as set by func_src_rgb(enum t).
Definition at line 367 of file blend_mode.hpp.
|
inline |
Returns true if the BlendMode has been marked as invalid, see set_as_invalid() and set_as_valid().
Definition at line 269 of file blend_mode.hpp.
|
static |
Returns a c_string for an enumerated value.
v | value to get the label-string of. |
Returns a c_string for an enumerated value.
v | value to get the label-string of. |
|
inline |
Inequality comparison operator.
Definition at line 239 of file blend_mode.hpp.
|
inline |
Equality comparison operator.
Definition at line 230 of file blend_mode.hpp.
|
inline |
Set the BlendMode to a value to mark it as invalid.
Definition at line 248 of file blend_mode.hpp.
|
inline |
Set the BlendMode to a value to mark it as valid.
Definition at line 258 of file blend_mode.hpp.