istereo

annotate src/EAGLView.h @ 16:20a9d3db38cb

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