summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qioscontext.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-03-26 15:58:15 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-27 17:51:21 +0100
commit2654fdb346ef740ecc2591edc7af860c08455548 (patch)
tree3008b2cd3dc8d6f8973167e1688c70dc50382d66 /src/plugins/platforms/ios/qioscontext.h
parent98e90f700a22bf7f139e4993cc96fa91f1183131 (diff)
iOS: Check FBO status and return failure from QIOSContext::makeCurrent()
The Khronos documentation for glCheckFramebufferStatus recommends calling the function to see if the framebuffer is complete prior to rendering. We now give more info to clients that call makeCurrent(), by storing the state of the default FBO and returning that, instead of always returning true and leaving the clients vulnerable to calling OpenGL functions on a non-complete FBO. Change-Id: Ia99c21f811ac799b350f07e73b2ae4b173d71120 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qioscontext.h')
-rw-r--r--src/plugins/platforms/ios/qioscontext.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioscontext.h b/src/plugins/platforms/ios/qioscontext.h
index c48a0251a9..52357a5d58 100644
--- a/src/plugins/platforms/ios/qioscontext.h
+++ b/src/plugins/platforms/ios/qioscontext.h
@@ -85,10 +85,12 @@ private:
GLuint depthRenderbuffer;
GLint renderbufferWidth;
GLint renderbufferHeight;
+ bool isComplete;
};
static void deleteBuffers(const FramebufferObject &framebufferObject);
+ FramebufferObject &backingFramebufferObjectFor(QPlatformSurface *) const;
mutable QHash<QIOSWindow *, FramebufferObject> m_framebufferObjects;
};