istereo

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