Esempio n. 1
0
	void BlendEquationImplOGL::clear(const BlendEquation& eqn) const
	{
		if(eqn != BlendEquation()) {
			ASSERT_LOG(!get_equation_stack().empty(), "Something went badly wrong blend mode stack was empty.");
			get_equation_stack().pop();
			BlendEquation& eqn = get_equation_stack().top();
			glBlendEquationSeparate(convert_eqn(eqn.getRgbEquation()), convert_eqn(eqn.getAlphaEquation()));
		}
	}
Esempio n. 2
0
	BlendEquationScopeOGL::BlendEquationScopeOGL(const ScopeableValue& sv)
		: stored_(false)
	{
		const BlendEquation& eqn = sv.getBlendEquation();
		if(sv.isBlendEquationSet() && eqn != BlendEquation()) {
			get_equation_stack().emplace(eqn);
			glBlendEquationSeparate(convert_eqn(eqn.getRgbEquation()), convert_eqn(eqn.getAlphaEquation()));
			stored_ = true;
		}
	}
Esempio n. 3
0
	void BlendEquationImplOGL::apply(const BlendEquation& eqn) const
	{
		if(eqn != BlendEquation()) {
			if(get_equation_stack().empty()) {
				get_equation_stack().emplace(BlendEquationConstants::BE_ADD, BlendEquationConstants::BE_ADD);
			}
			get_equation_stack().emplace(eqn);
			glBlendEquationSeparate(convert_eqn(eqn.getRgbEquation()), convert_eqn(eqn.getAlphaEquation()));
		}
	}
Esempio n. 4
0
BlendEquation *BlendEquation::getOrCreate(GLenum func)
{
    return getOrCreateImpl(BlendEquation(func));
}