istereo
annotate src/EAGLView.h @ 35:23e5d274b2a2
added options panel, also added the xib files to the repository as they're needed
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 09 Sep 2011 10:03:42 +0300 |
parents | 1bb950d0976b |
children | ff055bff6a15 |
rev | line source |
---|---|
nuclear@0 | 1 #import <UIKit/UIKit.h> |
nuclear@0 | 2 #import <QuartzCore/QuartzCore.h> |
nuclear@0 | 3 |
nuclear@0 | 4 #import "ESRenderer.h" |
nuclear@0 | 5 |
nuclear@35 | 6 |
nuclear@35 | 7 void show_options(void); |
nuclear@35 | 8 void hide_options(void); |
nuclear@35 | 9 |
nuclear@35 | 10 |
nuclear@0 | 11 // This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. |
nuclear@0 | 12 // The view content is basically an EAGL surface you render your OpenGL scene into. |
nuclear@0 | 13 // Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. |
nuclear@0 | 14 @interface EAGLView : UIView |
nuclear@35 | 15 { |
nuclear@0 | 16 @private |
nuclear@35 | 17 id <ESRenderer> renderer; |
nuclear@0 | 18 |
nuclear@35 | 19 BOOL animating; |
nuclear@35 | 20 BOOL displayLinkSupported; |
nuclear@35 | 21 NSInteger animationFrameInterval; |
nuclear@35 | 22 // Use of the CADisplayLink class is the preferred method for controlling your animation timing. |
nuclear@35 | 23 // CADisplayLink will link to the main display and fire every vsync when added to a given run-loop. |
nuclear@35 | 24 // The NSTimer class is used only as fallback when running on a pre 3.1 device where CADisplayLink |
nuclear@35 | 25 // isn't available. |
nuclear@35 | 26 id displayLink; |
nuclear@35 | 27 NSTimer *animationTimer; |
nuclear@0 | 28 } |
nuclear@0 | 29 |
nuclear@0 | 30 @property (readonly, nonatomic, getter=isAnimating) BOOL animating; |
nuclear@0 | 31 @property (nonatomic) NSInteger animationFrameInterval; |
nuclear@0 | 32 |
nuclear@0 | 33 - (void)startAnimation; |
nuclear@0 | 34 - (void)stopAnimation; |
nuclear@0 | 35 - (void)drawView:(id)sender; |
nuclear@0 | 36 |
nuclear@0 | 37 @end |