nuclear@0: #import nuclear@0: #import nuclear@0: nuclear@0: #import "ESRenderer.h" nuclear@0: nuclear@35: nuclear@35: void show_options(void); nuclear@35: void hide_options(void); nuclear@35: nuclear@35: nuclear@0: // This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. nuclear@0: // The view content is basically an EAGL surface you render your OpenGL scene into. nuclear@0: // Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. nuclear@0: @interface EAGLView : UIView nuclear@35: { nuclear@0: @private nuclear@35: id renderer; nuclear@0: nuclear@35: BOOL animating; nuclear@35: BOOL displayLinkSupported; nuclear@35: NSInteger animationFrameInterval; nuclear@35: // Use of the CADisplayLink class is the preferred method for controlling your animation timing. nuclear@35: // CADisplayLink will link to the main display and fire every vsync when added to a given run-loop. nuclear@35: // The NSTimer class is used only as fallback when running on a pre 3.1 device where CADisplayLink nuclear@35: // isn't available. nuclear@35: id displayLink; nuclear@35: NSTimer *animationTimer; nuclear@0: } nuclear@0: nuclear@0: @property (readonly, nonatomic, getter=isAnimating) BOOL animating; nuclear@0: @property (nonatomic) NSInteger animationFrameInterval; nuclear@0: nuclear@0: - (void)startAnimation; nuclear@0: - (void)stopAnimation; nuclear@0: - (void)drawView:(id)sender; nuclear@0: nuclear@0: @end