- added the missing blend modes to FRenderStyle.

This commit is contained in:
Christoph Oelckers 2020-04-11 19:03:20 +02:00
parent 3e285d2261
commit 2ff93b4635
3 changed files with 5 additions and 1 deletions

View file

@ -109,6 +109,8 @@ enum ERenderAlpha
STYLEALPHA_InvSrcCol, // Blend factor is 1.0 - color (HWR only)
STYLEALPHA_DstCol, // Blend factor is dest. color (HWR only)
STYLEALPHA_InvDstCol, // Blend factor is 1.0 - dest. color (HWR only)
STYLEALPHA_Dst, // Blend factor is dest. alpha
STYLEALPHA_InvDst, // Blend factor is 1.0 - dest. alpha
STYLEALPHA_MAX
};

View file

@ -349,7 +349,7 @@ void FGLRenderState::ApplyMaterial(FMaterial *mat, int clampmode, int translatio
void FGLRenderState::ApplyBlendMode()
{
static int blendstyles[] = { GL_ZERO, GL_ONE, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, };
static int blendstyles[] = { GL_ZERO, GL_ONE, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA };
static int renderops[] = { 0, GL_FUNC_ADD, GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1 };

View file

@ -227,6 +227,8 @@ void GraphicsPipelineBuilder::setBlendMode(const FRenderStyle &style)
VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR,
VK_BLEND_FACTOR_DST_COLOR,
VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR,
VK_BLEND_FACTOR_DST_ALPHA,
VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA,
};
static const int renderops[] = {