diff options
Diffstat (limited to 'src/render/backend/qgraphicscontext.cpp')
-rw-r--r-- | src/render/backend/qgraphicscontext.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/render/backend/qgraphicscontext.cpp b/src/render/backend/qgraphicscontext.cpp index e42bcbfac..1280f8439 100644 --- a/src/render/backend/qgraphicscontext.cpp +++ b/src/render/backend/qgraphicscontext.cpp @@ -132,7 +132,7 @@ void QGraphicsContext::initialize() qCDebug(Backend) << "VAO support = " << m_supportsVAO; } -bool QGraphicsContext::beginDrawing(QSurface *surface, const QColor &clearColor) +bool QGraphicsContext::beginDrawing(QSurface *surface, const QColor &color) { Q_ASSERT(surface); Q_ASSERT(m_gl); @@ -156,7 +156,7 @@ bool QGraphicsContext::beginDrawing(QSurface *surface, const QColor &clearColor) initialize(); } - m_gl->functions()->glClearColor(clearColor.redF(), clearColor.greenF(), clearColor.blueF(), clearColor.alphaF()); + clearColor(color); if (m_activeShader) m_activeShader = NULL; @@ -651,6 +651,11 @@ GLuint QGraphicsContext::boundFrameBufferObject() return m_glHelper->boundFrameBufferObject(); } +void QGraphicsContext::clearColor(const QColor &color) +{ + m_gl->functions()->glClearColor(color.redF(), color.greenF(), color.blueF(), color.alphaF()); +} + /*! \internal \returns a texture unit for a texture, -1 if all texture units are assigned. |