diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2016-04-07 21:22:31 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-04-11 08:00:15 +0000 |
commit | dc58fc97ed9a36fa454eaa43e6f1cd7dc13a6d2d (patch) | |
tree | 925bf7fc16fba19ca975f0e92af1bb9a2ca35894 /src/render/graphicshelpers/graphicscontext.cpp | |
parent | 19a8c6b46cb538ee4e628cbe50f6fa549094d7eb (diff) |
Properly handle alpha to coverage state in non-cloning codepath
Also improve the alpha to coverage handlign in the helpers by using
a single function rather than two.
This removes GL errors about bad glFace enum values (caused by bad
handlign of alpha to coverage in switch statement, which led to a
FrontFace state being created with bad data).
Change-Id: I832d92fcb07134525f421d3a3b4d12e9f5f6428c
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext.cpp')
-rw-r--r-- | src/render/graphicshelpers/graphicscontext.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp index 3d387be66..1600f24e6 100644 --- a/src/render/graphicshelpers/graphicscontext.cpp +++ b/src/render/graphicshelpers/graphicscontext.cpp @@ -832,14 +832,9 @@ void GraphicsContext::buildUniformBuffer(const QVariant &v, const ShaderUniform m_glHelper->buildUniformBuffer(v, description, buffer); } -void GraphicsContext::enableAlphaCoverage() +void GraphicsContext::setAlphaCoverageEnabled(bool enabled) { - m_glHelper->enableAlphaCoverage(); -} - -void GraphicsContext::disableAlphaCoverage() -{ - m_glHelper->disableAlphaCoverage(); + m_glHelper->setAlphaCoverageEnabled(enabled); } GLuint GraphicsContext::boundFrameBufferObject() |