From 10e7d4aaa499d9a046f794b96a0caffeb3271f1a Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 9 Oct 2018 12:52:39 +0200 Subject: 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 --- src/quick/scenegraph/qsgdefaultcontext.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/quick/scenegraph') 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) -- cgit v1.2.3