diff options
author | con <qtc-committer@nokia.com> | 2011-04-19 16:15:09 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2011-05-04 09:03:49 +0200 |
commit | 95bbf56ff076d003eddf7a7f9f1030d2c683ca01 (patch) | |
tree | 3aba04225580ff7199782e1c698d1fea61f85beb /src/plugins/platforms/uikit/quikitwindow.h | |
parent | 64fa65df74e25f97bacc63db2019eaf7e08caff2 (diff) |
Support GL ES 2 with uikit.
For GL ES 2 teach the paint device about the fact that it
is doing rendering backed by a framebuffer object,
not a system framebuffer (which doesn't exist).
(cherry picked from commit 3b437a7706efbaaafdc4861393cbe21354cf4ee2)
Diffstat (limited to 'src/plugins/platforms/uikit/quikitwindow.h')
-rw-r--r-- | src/plugins/platforms/uikit/quikitwindow.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/platforms/uikit/quikitwindow.h b/src/plugins/platforms/uikit/quikitwindow.h index 9e73754fc8..5c6496a2ce 100644 --- a/src/plugins/platforms/uikit/quikitwindow.h +++ b/src/plugins/platforms/uikit/quikitwindow.h @@ -47,6 +47,8 @@ #import <UIKit/UIKit.h> #import <OpenGLES/ES1/gl.h> #import <OpenGLES/ES1/glext.h> +#import <OpenGLES/ES2/gl.h> +#import <OpenGLES/ES2/glext.h> #import <OpenGLES/EAGL.h> @interface EAGLView : UIView <UIKeyInput> @@ -59,6 +61,7 @@ GLuint mFramebuffer, mColorRenderbuffer, mDepthRenderbuffer; + id delegate; // ------- Text Input ---------- UITextAutocapitalizationType autocapitalizationType; UITextAutocorrectionType autocorrectionType; @@ -77,6 +80,8 @@ - (void)setWindow:(QPlatformWindow *)window; - (void)sendMouseEventForTouches:(NSSet *)touches withEvent:(UIEvent *)event fakeButtons:(Qt::MouseButtons)buttons; +@property (readonly,getter=fbo) GLint fbo; +@property (nonatomic, assign) id delegate; // ------- Text Input ---------- @@ -90,6 +95,10 @@ @end +@protocol EAGLViewDelegate +- (void)eaglView:(EAGLView *)view usesFramebuffer:(GLuint)buffer; +@end + class EAGLPlatformContext; QT_BEGIN_NAMESPACE @@ -103,7 +112,7 @@ public: ~QUIKitWindow(); UIWindow *nativeWindow() const { return mWindow; } - UIView *nativeView() const { return mView; } + EAGLView *nativeView() const { return mView; } void setGeometry(const QRect &rect); UIWindow *ensureNativeWindow(); |