summaryrefslogtreecommitdiffstats
path: root/src/render/graphicshelpers/graphicscontext.cpp
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2016-03-17 21:45:30 +0000
committerSean Harmer <sean.harmer@kdab.com>2016-03-22 12:53:11 +0000
commit68667e9105744478bcfd2cf16efda71a350da372 (patch)
treebf88e711878abc9403b89a21a1927e999448a6d9 /src/render/graphicshelpers/graphicscontext.cpp
parente3c31c3a5a1061e2cf85e49398093b0a11437649 (diff)
Added properties to QClearBuffers
- clearColor - clearDepthValue - clearStencilValue Task-number: QTBUG-51460 Change-Id: Ib31efde0b6ab97ef1f57d4ce71fb2fbca218dc85 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext.cpp')
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index ce10a25f3..539ebec41 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -852,6 +852,16 @@ void GraphicsContext::clearColor(const QColor &color)
m_gl->functions()->glClearColor(color.redF(), color.greenF(), color.blueF(), color.alphaF());
}
+void GraphicsContext::clearDepthValue(float depth)
+{
+ m_gl->functions()->glClearDepthf(depth);
+}
+
+void GraphicsContext::clearStencilValue(int stencil)
+{
+ m_gl->functions()->glClearStencil(stencil);
+}
+
void GraphicsContext::enableClipPlane(int clipPlane)
{
m_glHelper->enableClipPlane(clipPlane);