summaryrefslogtreecommitdiffstats
path: root/src/opengl/qplatformbackingstoreopenglsupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qplatformbackingstoreopenglsupport.cpp')
-rw-r--r--src/opengl/qplatformbackingstoreopenglsupport.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/opengl/qplatformbackingstoreopenglsupport.cpp b/src/opengl/qplatformbackingstoreopenglsupport.cpp
index 511d85a400b..a188d25db5e 100644
--- a/src/opengl/qplatformbackingstoreopenglsupport.cpp
+++ b/src/opengl/qplatformbackingstoreopenglsupport.cpp
@@ -450,6 +450,18 @@ GLuint QPlatformBackingStoreOpenGLSupport::toTexture(const QRegion &dirtyRegion,
return textureId;
}
+static QPlatformBackingStoreOpenGLSupportBase *createOpenGLSupport()
+{
+ return new QPlatformBackingStoreOpenGLSupport;
+}
+
+static void setDefaultOpenGLSupportFactoryFunction()
+{
+ if (!QPlatformBackingStoreOpenGLSupportBase::factoryFunction())
+ QPlatformBackingStoreOpenGLSupportBase::setFactoryFunction(createOpenGLSupport);
+}
+Q_CONSTRUCTOR_FUNCTION(setDefaultOpenGLSupportFactoryFunction);
+
#endif // QT_NO_OPENGL
QT_END_NAMESPACE