aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontext.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@live.com>2014-02-05 15:55:23 -0600
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-06 23:45:07 +0100
commita8a90519cb35481e96fe8889846bfaa424e13e8a (patch)
tree76e4b6c75d5f8745976f21207c196759bb47b1a6 /src/quick/scenegraph/qsgcontext.cpp
parentc160190a6faed125d7ada130a28583b7d5861441 (diff)
Fix scenegraph backend API for material shaders.
Without this change, it is not possible to implement a custom renderer (it has no way to compile or initialize material shaders). Change-Id: Ie8778f739f3551f88f0d44ccb9769063a87ff276 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext.cpp')
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index f9bc615f5c..5135cc629c 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -446,6 +446,20 @@ void QSGRenderContext::registerFontengineForCleanup(QFontEngine *engine)
}
/*!
+ compile/initialize are protected member functions of QSGMaterialShader.
+ We expose them here for custom renderers.
+ */
+void QSGRenderContext::compileShader(QSGMaterialShader *shader)
+{
+ shader->compile();
+}
+
+void QSGRenderContext::initializeShader(QSGMaterialShader *shader)
+{
+ shader->initialize();
+}
+
+/*!
Initializes the scene graph render context with the GL context \a context. This also
emits the ready() signal so that the QML graph can start building scene graph nodes.
*/