summaryrefslogtreecommitdiff
path: root/platform/iphone/gl_view.h
diff options
context:
space:
mode:
authorpunto- <ariel@okamstudio.com>2015-10-22 22:07:32 -0300
committerpunto- <ariel@okamstudio.com>2015-10-22 22:07:32 -0300
commit4baf65dab78b6e8062de760010338c316c628394 (patch)
tree23f68b4a108279955915cc00ae3db59c2cce50ac /platform/iphone/gl_view.h
parentd123c89c5802777e02402108d9271ed2f29368fe (diff)
parent15a826571c8f4809023c2f3ca014705feb5492bf (diff)
Merge pull request #2663 from romulox-x/cadisplaylink
Added CADisplayLink setting for iOS
Diffstat (limited to 'platform/iphone/gl_view.h')
-rwxr-xr-xplatform/iphone/gl_view.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/platform/iphone/gl_view.h b/platform/iphone/gl_view.h
index cda75394db..ca2d1d25ae 100755
--- a/platform/iphone/gl_view.h
+++ b/platform/iphone/gl_view.h
@@ -34,8 +34,6 @@
#import <MediaPlayer/MediaPlayer.h>
#import <AVFoundation/AVFoundation.h>
-#define USE_CADISPLAYLINK 0 //iOS version 3.1+ is required
-
@protocol GLViewDelegate;
@interface GLView : UIView<UIKeyInput>
@@ -53,13 +51,13 @@
// OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist)
GLuint depthRenderbuffer;
-#if USE_CADISPLAYLINK
+ BOOL useCADisplayLink;
// CADisplayLink available on 3.1+ synchronizes the animation timer & drawing with the refresh rate of the display, only supports animation intervals of 1/60 1/30 & 1/15
CADisplayLink *displayLink;
-#else
+
// An animation timer that, when animation is started, will periodically call -drawView at the given rate.
+ // Only used if CADisplayLink is not
NSTimer *animationTimer;
-#endif
NSTimeInterval animationInterval;
@@ -104,6 +102,7 @@
- (void)audioRouteChangeListenerCallback:(NSNotification*)notification;
@property NSTimeInterval animationInterval;
+@property(nonatomic, assign) BOOL useCADisplayLink;
@end