summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosintegration.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-03-27 14:58:23 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-28 13:01:52 +0100
commitfb3577039ca89011748ed64ad3f807e009559407 (patch)
treefb6d8d2ef103c81167786c85008a10698c8618d5 /src/plugins/platforms/ios/qiosintegration.mm
parentc0701f3789acf3234e9f6431b4e8c7dc3ccefabb (diff)
iOS: Add support for offscreen GL surfaces without using hidden windows
There's no need to create a hidden window to get a surface on iOS, as the platform supports FBOs. Note that defaultFramebufferObject() returns 0 in the case of offscreen surfaces, which is technically not a valid FBO on iOS due to the indirect rendering, but binding and rendering to the zero-FBO seems to be no-ops, so clients may safely call eg glBindFramebuffer(GL_FRAMEBUFFER, ctx->defaultFramebufferObject()) to restore the default FBO after drawing to its own FBO. Change-Id: I2e67f5d69c0698562052f5ac1df0bbfaa3337148 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosintegration.mm')
-rw-r--r--src/plugins/platforms/ios/qiosintegration.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm
index 7a40e349c9..0fe7adff9f 100644
--- a/src/plugins/platforms/ios/qiosintegration.mm
+++ b/src/plugins/platforms/ios/qiosintegration.mm
@@ -51,6 +51,8 @@
#include "qiostheme.h"
#include "qiosservices.h"
+#include <qpa/qplatformoffscreensurface.h>
+
#include <QtPlatformSupport/private/qcoretextfontdatabase_p.h>
#include <QtPlatformSupport/private/qmacmime_p.h>
#include <QDir>
@@ -144,6 +146,11 @@ QPlatformOpenGLContext *QIOSIntegration::createPlatformOpenGLContext(QOpenGLCont
return new QIOSContext(context);
}
+QPlatformOffscreenSurface *QIOSIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
+{
+ return new QPlatformOffscreenSurface(surface);
+}
+
QAbstractEventDispatcher *QIOSIntegration::createEventDispatcher() const
{
if (isQtApplication())