This class defines a blending mode used during rendering. More...
#include <Luminous/BlendMode.hpp>
Public Types | |
| enum | Equation { ADD = GL_FUNC_ADD, SUBTRACT = GL_FUNC_SUBTRACT, REVERSE_SUBTRACT = GL_FUNC_REVERSE_SUBTRACT, MIN = GL_MIN, MAX = GL_MAX } |
| The blending equation. More... | |
| enum | Function { ZERO = GL_ZERO, ONE = GL_ONE, SOURCE_COLOR = GL_SRC_COLOR, SOURCE_ALPHA = GL_SRC_ALPHA, ONE_MINUS_SOURCE_COLOR = GL_ONE_MINUS_SRC_COLOR, ONE_MINUS_SOURCE_ALPHA = GL_ONE_MINUS_SRC_ALPHA, DESTINATION_COLOR = GL_DST_COLOR, DESTINATION_ALPHA = GL_DST_ALPHA, ONE_MINUS_DESTINATION_COLOR = GL_ONE_MINUS_DST_COLOR, ONE_MINUS_DESTINATION_ALPHA = GL_ONE_MINUS_DST_ALPHA, CONSTANT_COLOR = GL_CONSTANT_COLOR, CONSTANT_ALPHA = GL_CONSTANT_ALPHA, ONE_MINUS_CONSTANT_COLOR = GL_ONE_MINUS_CONSTANT_COLOR, ONE_MINUS_CONSTANT_ALPHA = GL_ONE_MINUS_CONSTANT_ALPHA, ALPHA_SATURATE = GL_SRC_ALPHA_SATURATE } |
| Defines the pixel arithmetic used during blending. More... | |
Public Member Functions | |
| LUMINOUS_API | BlendMode () |
| Constructs new blend mode object. | |
| const Radiant::Color & | constantColor () const |
| Returns blending color. More... | |
| Function | destFunction () const |
| Sets function to use when blending destination. More... | |
| Equation | equation () const |
| Returns blending equation. More... | |
| void | setConstantColor (const Radiant::Color &color) |
| Set constant blending color. More... | |
| void | setDestFunction (Function func) |
| Sets function to use when blending destination. More... | |
| void | setEquation (Equation eq) |
| Set blending equation. More... | |
| void | setSourceFunction (Function func) |
| Sets function to use when blending source. More... | |
| Function | sourceFunction () const |
| Returns the function to use when blending source. More... | |
Static Public Member Functions | |
| static LUMINOUS_API BlendMode | Additive () |
| Returns additive blending mode. More... | |
| static BlendMode | Default () |
| Returns default blend mode. More... | |
| static LUMINOUS_API BlendMode | Subtractive () |
| Returns subtractive blending mode. More... | |
This class defines a blending mode used during rendering.
The blending equation.
See http://www.opengl.org/sdk/docs/man3/xhtml/glBlendEquation.xml for details.
| Enumerator | |
|---|---|
| ADD |
Add colors. |
| SUBTRACT |
Subtract colors. |
| REVERSE_SUBTRACT |
Subtract colors reversily. |
| MIN |
Minimum of colors. |
| MAX |
Maximum of colors. |
Defines the pixel arithmetic used during blending.
See http://www.opengl.org/sdk/docs/man3/xhtml/glBlendFunc.xml for details.
|
static |
Returns additive blending mode.
|
inline |
Returns blending color.
|
inlinestatic |
Returns default blend mode.
|
inline |
Sets function to use when blending destination.
|
inline |
Returns blending equation.
|
inline |
Set constant blending color.
| color | Color for constant blending color. |
|
inline |
Sets function to use when blending destination.
| func | Function to use for blending destination |
|
inline |
Set blending equation.
| eq | Equation to use for blending |
|
inline |
Sets function to use when blending source.
| func | Function to use for blending source |
|
inline |
Returns the function to use when blending source.