diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-10-09 12:52:39 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-10-09 15:52:05 +0000 |
commit | 10e7d4aaa499d9a046f794b96a0caffeb3271f1a (patch) | |
tree | 3cc5157813f29433902b7203f26a93841648c93a /src/quick/scenegraph | |
parent | 7cd9447e14159be90a5fdb927a4a3ed2cbff50b2 (diff) |
Fix use of OpenGL scenegraph in static builds
Make sure the resources are initialized when the default QSG context is
in use, and not just when QML is used.
Change-Id: I581906bf59cf4ea07505c8ad9e15f2833f727ca2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultcontext.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgdefaultcontext.cpp b/src/quick/scenegraph/qsgdefaultcontext.cpp index 9a0ac66690..1124bf1727 100644 --- a/src/quick/scenegraph/qsgdefaultcontext.cpp +++ b/src/quick/scenegraph/qsgdefaultcontext.cpp @@ -290,3 +290,10 @@ QSGRendererInterface::ShaderSourceTypes QSGDefaultContext::shaderSourceType() co } QT_END_NAMESPACE + +static void initResources() +{ + Q_INIT_RESOURCE(scenegraph); +} + +Q_CONSTRUCTOR_FUNCTION(initResources) |