25 #include "glfBlendMode.hh"
26 #include "glfException.hh"
35 equation_ = GL_FUNC_ADD;
42 enable_ = enable ? GL_TRUE : GL_FALSE;
58 if (enable_ == GL_TRUE) {
60 glBlendEquation(equation_);
61 glBlendFunc(sfactor_, dfactor_);
66 GLF_THROW_ON_OPENGL_ERROR;
void SetBlendFunc(GLenum sfactor, GLenum dfactor)
Sets the blending factors for the source and destination color.
void SetBlendEquation(GLenum equation)
Sets the blend equation.
static const glfBlendMode DEFAULT
The default blend mode.
Defines the function that blends rendered geometry with its background.
void Bind() const
Binds the blend mode.
void EnableBlending(bool enable)
Sets whether to enable blending.