From 450d3efcb11da21e1c4f206dc57aeaddf10a1e70 Mon Sep 17 00:00:00 2001 From: Maciej Kujalowicz Date: Wed, 30 Oct 2013 13:01:21 +0100 Subject: iOS: Enable threaded OpenGL. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change activates ThreadedOpenGL and ThreadedPixmaps capabilities in the iOS integration. QIOSContext is expanded with a support for a shared context. Change-Id: I56615c870a24e17850ad2748421c54e015de3ab2 Reviewed-by: Ian Dean Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qioscontext.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/platforms/ios/qioscontext.h') diff --git a/src/plugins/platforms/ios/qioscontext.h b/src/plugins/platforms/ios/qioscontext.h index 082ec4794c..961661c5d3 100644 --- a/src/plugins/platforms/ios/qioscontext.h +++ b/src/plugins/platforms/ios/qioscontext.h @@ -66,10 +66,14 @@ public: GLuint defaultFramebufferObject(QPlatformSurface *) const; QFunctionPointer getProcAddress(const QByteArray &procName); + bool isSharing() const Q_DECL_OVERRIDE; + bool isValid() const Q_DECL_OVERRIDE; + private Q_SLOTS: void windowDestroyed(QObject *object); private: + QIOSContext *m_sharedContext; EAGLContext *m_eaglContext; QSurfaceFormat m_format; -- cgit v1.2.3 From bb1225f5ba6f4bc5d7b8c2878d8f4ac492631c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 11 Nov 2013 15:17:56 +0100 Subject: iOS: Tie QIOSContext FBOs to corresponding QPlatformWindow, not QWindow A QWindow may be created() and destroyed() multiple times in the lifetime of the window, each time resulting in a new platform window (QIOSWindow) being created. This QIOSWindow is backed by a new UIView each time, hence it needs a new FBO and renderbuffer-mapping, since the previous renderbuffer was mapped to the old UIView. This fixes a bug where a QWindow would not render after a destroy() unless it was resized (which triggered new FBO/renderbuffers). We need to inherit QObject so that we can watch the destroyed() signal. Change-Id: I93172dd6280b86b49755bf7abddf061d7e6b66f1 Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/ios/qioscontext.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/ios/qioscontext.h') diff --git a/src/plugins/platforms/ios/qioscontext.h b/src/plugins/platforms/ios/qioscontext.h index 961661c5d3..c48a0251a9 100644 --- a/src/plugins/platforms/ios/qioscontext.h +++ b/src/plugins/platforms/ios/qioscontext.h @@ -48,6 +48,8 @@ QT_BEGIN_NAMESPACE +class QIOSWindow; + class QIOSContext : public QObject, public QPlatformOpenGLContext { Q_OBJECT @@ -87,7 +89,7 @@ private: static void deleteBuffers(const FramebufferObject &framebufferObject); - mutable QHash m_framebufferObjects; + mutable QHash m_framebufferObjects; }; QT_END_NAMESPACE -- cgit v1.2.3