istereo

view src/EAGLView.h @ 14:b39d8607f4bb

added textures
author John Tsiombikas <nuclear@mutantstargoat.com>
date Wed, 07 Sep 2011 09:03:51 +0300
parents
children 23e5d274b2a2
line source
1 //
2 // EAGLView.h
3 // istereo
4 //
5 // Created by nuclear on 9/6/11.
6 // Copyright __MyCompanyName__ 2011. All rights reserved.
7 //
9 #import <UIKit/UIKit.h>
10 #import <QuartzCore/QuartzCore.h>
12 #import "ESRenderer.h"
14 // This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
15 // The view content is basically an EAGL surface you render your OpenGL scene into.
16 // Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
17 @interface EAGLView : UIView
18 {
19 @private
20 id <ESRenderer> renderer;
22 BOOL animating;
23 BOOL displayLinkSupported;
24 NSInteger animationFrameInterval;
25 // Use of the CADisplayLink class is the preferred method for controlling your animation timing.
26 // CADisplayLink will link to the main display and fire every vsync when added to a given run-loop.
27 // The NSTimer class is used only as fallback when running on a pre 3.1 device where CADisplayLink
28 // isn't available.
29 id displayLink;
30 NSTimer *animationTimer;
31 }
33 @property (readonly, nonatomic, getter=isAnimating) BOOL animating;
34 @property (nonatomic) NSInteger animationFrameInterval;
36 - (void)startAnimation;
37 - (void)stopAnimation;
38 - (void)drawView:(id)sender;
40 @end