aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontext_p.h
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-07-01 19:19:56 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-01 13:49:46 +0200
commit78923902089d0a70c096e5f47f42e24fbcd4fa56 (patch)
treecdf04742cba0cf0ae956129e80996f9eef51c070 /src/quick/scenegraph/qsgcontext_p.h
parent6e70fa5ee8d0433dbb0d42378bce10db18b05fab (diff)
Expose the scene graph publically through a QSGEngine class
This change wraps QSGRenderContext and QSGContext in a new QSGEngine class, and expose a public interface of QSGRenderer through a QSGAbstractRenderer to make it usable on a standalone window or FBO. Change-Id: I2d41187472424f5ea64650a006bcd61f2711f6b9 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext_p.h')
-rw-r--r--src/quick/scenegraph/qsgcontext_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h
index faad57b893..7113ef8530 100644
--- a/src/quick/scenegraph/qsgcontext_p.h
+++ b/src/quick/scenegraph/qsgcontext_p.h
@@ -97,6 +97,7 @@ public:
QOpenGLContext *openglContext() const { return m_gl; }
QSGContext *sceneGraphContext() const { return m_sg; }
+ bool isValid() const { return m_gl; }
virtual void initialize(QOpenGLContext *context);
virtual void invalidate();
@@ -117,6 +118,7 @@ public:
virtual void compile(QSGMaterialShader *shader, QSGMaterial *material, const char *vertexCode = 0, const char *fragmentCode = 0);
virtual void initialize(QSGMaterialShader *shader);
+ void setAttachToGLContext(bool attach);
void registerFontengineForCleanup(QFontEngine *engine);
static QSGRenderContext *from(QOpenGLContext *context);
@@ -146,6 +148,7 @@ protected:
bool m_brokenIBOs;
bool m_serializedRender;
+ bool m_attachToGLContext;
};