istereo
annotate src/EAGLView.h @ 43:73813c1176de
better hgignore
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 14 Aug 2015 04:33:42 +0300 |
parents | 23e5d274b2a2 |
children |
rev | line source |
---|---|
nuclear@39 | 1 /* |
nuclear@39 | 2 Stereoscopic tunnel for iOS. |
nuclear@39 | 3 Copyright (C) 2011 John Tsiombikas <nuclear@member.fsf.org> |
nuclear@39 | 4 |
nuclear@39 | 5 This program is free software: you can redistribute it and/or modify |
nuclear@39 | 6 it under the terms of the GNU General Public License as published by |
nuclear@39 | 7 the Free Software Foundation, either version 3 of the License, or |
nuclear@39 | 8 (at your option) any later version. |
nuclear@39 | 9 |
nuclear@39 | 10 This program is distributed in the hope that it will be useful, |
nuclear@39 | 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
nuclear@39 | 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
nuclear@39 | 13 GNU General Public License for more details. |
nuclear@39 | 14 |
nuclear@39 | 15 You should have received a copy of the GNU General Public License |
nuclear@39 | 16 along with this program. If not, see <http://www.gnu.org/licenses/>. |
nuclear@39 | 17 */ |
nuclear@39 | 18 |
nuclear@39 | 19 /* XXX this file is mostly generated from Xcode and therefore sucks ass */ |
nuclear@39 | 20 |
nuclear@0 | 21 #import <UIKit/UIKit.h> |
nuclear@0 | 22 #import <QuartzCore/QuartzCore.h> |
nuclear@0 | 23 |
nuclear@0 | 24 #import "ESRenderer.h" |
nuclear@0 | 25 |
nuclear@35 | 26 |
nuclear@35 | 27 void show_options(void); |
nuclear@35 | 28 void hide_options(void); |
nuclear@35 | 29 |
nuclear@35 | 30 |
nuclear@0 | 31 // This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. |
nuclear@0 | 32 // The view content is basically an EAGL surface you render your OpenGL scene into. |
nuclear@0 | 33 // Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. |
nuclear@0 | 34 @interface EAGLView : UIView |
nuclear@35 | 35 { |
nuclear@0 | 36 @private |
nuclear@35 | 37 id <ESRenderer> renderer; |
nuclear@0 | 38 |
nuclear@35 | 39 BOOL animating; |
nuclear@35 | 40 BOOL displayLinkSupported; |
nuclear@35 | 41 NSInteger animationFrameInterval; |
nuclear@35 | 42 // Use of the CADisplayLink class is the preferred method for controlling your animation timing. |
nuclear@35 | 43 // CADisplayLink will link to the main display and fire every vsync when added to a given run-loop. |
nuclear@35 | 44 // The NSTimer class is used only as fallback when running on a pre 3.1 device where CADisplayLink |
nuclear@35 | 45 // isn't available. |
nuclear@35 | 46 id displayLink; |
nuclear@35 | 47 NSTimer *animationTimer; |
nuclear@0 | 48 } |
nuclear@0 | 49 |
nuclear@0 | 50 @property (readonly, nonatomic, getter=isAnimating) BOOL animating; |
nuclear@0 | 51 @property (nonatomic) NSInteger animationFrameInterval; |
nuclear@0 | 52 |
nuclear@0 | 53 - (void)startAnimation; |
nuclear@0 | 54 - (void)stopAnimation; |
nuclear@0 | 55 - (void)drawView:(id)sender; |
nuclear@0 | 56 |
nuclear@0 | 57 @end |