Add internal 'KeepDestAlpha' BlendType (for use in WindowVX)
This commit is contained in:
parent
d95e90db34
commit
d654fb7dd6
|
@ -31,6 +31,8 @@ struct SDL_Color;
|
||||||
|
|
||||||
enum BlendType
|
enum BlendType
|
||||||
{
|
{
|
||||||
|
BlendKeepDestAlpha = -1,
|
||||||
|
|
||||||
BlendNormal = 0,
|
BlendNormal = 0,
|
||||||
BlendAddition = 1,
|
BlendAddition = 1,
|
||||||
BlendSubstraction = 2
|
BlendSubstraction = 2
|
||||||
|
|
|
@ -64,6 +64,12 @@ void GLBlendMode::apply(const BlendType &value)
|
||||||
{
|
{
|
||||||
switch (value)
|
switch (value)
|
||||||
{
|
{
|
||||||
|
case BlendKeepDestAlpha :
|
||||||
|
gl.BlendEquation(GL_FUNC_ADD);
|
||||||
|
gl.BlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
|
||||||
|
GL_ZERO, GL_ONE);
|
||||||
|
break;
|
||||||
|
|
||||||
case BlendNormal :
|
case BlendNormal :
|
||||||
gl.BlendEquation(GL_FUNC_ADD);
|
gl.BlendEquation(GL_FUNC_ADD);
|
||||||
gl.BlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
|
gl.BlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
|
||||||
|
|
Loading…
Reference in New Issue