vrshoot

annotate src/ios/glview.h @ 3:c179c72369be

rename candy->vr
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 03 Feb 2014 08:52:13 +0200
parents
children
rev   line source
nuclear@0 1 #import <UIKit/UIKit.h>
nuclear@0 2 #import <QuartzCore/QuartzCore.h>
nuclear@0 3
nuclear@0 4 #import <OpenGLES/ES2/gl.h>
nuclear@0 5 #import <OpenGLES/ES2/glext.h>
nuclear@0 6
nuclear@0 7 @interface GLView : UIView
nuclear@0 8 {
nuclear@0 9 @private
nuclear@0 10 int xsz, ysz;
nuclear@0 11 EAGLContext *context;
nuclear@0 12
nuclear@0 13 unsigned int fbo, rbuf_color, rbuf_depth;
nuclear@0 14
nuclear@0 15 BOOL animating;
nuclear@0 16 BOOL display_link_supported;
nuclear@0 17 NSInteger anim_frame_interval;
nuclear@0 18 // Use of the CADisplayLink class is the preferred method for controlling your animation timing.
nuclear@0 19 // CADisplayLink will link to the main display and fire every vsync when added to a given run-loop.
nuclear@0 20 // The NSTimer class is used only as fallback when running on a pre 3.1 device where CADisplayLink
nuclear@0 21 // isn't available.
nuclear@0 22 id display_link;
nuclear@0 23 NSTimer *anim_timer;
nuclear@0 24 }
nuclear@0 25
nuclear@0 26 @property (readonly, nonatomic, getter=isAnimating) BOOL animating;
nuclear@0 27 @property (nonatomic) NSInteger anim_frame_interval;
nuclear@0 28
nuclear@0 29 - (void)startAnimation;
nuclear@0 30 - (void)stopAnimation;
nuclear@0 31 - (void)drawView: (id)sender;
nuclear@0 32 - (void)swap_buffers;
nuclear@0 33
nuclear@0 34 @end