nuclear@39: /* nuclear@39: Stereoscopic tunnel for iOS. nuclear@39: Copyright (C) 2011 John Tsiombikas nuclear@39: nuclear@39: This program is free software: you can redistribute it and/or modify nuclear@39: it under the terms of the GNU General Public License as published by nuclear@39: the Free Software Foundation, either version 3 of the License, or nuclear@39: (at your option) any later version. nuclear@39: nuclear@39: This program is distributed in the hope that it will be useful, nuclear@39: but WITHOUT ANY WARRANTY; without even the implied warranty of nuclear@39: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nuclear@39: GNU General Public License for more details. nuclear@39: nuclear@39: You should have received a copy of the GNU General Public License nuclear@39: along with this program. If not, see . nuclear@39: */ nuclear@39: nuclear@39: /* XXX this file is mostly generated from Xcode and therefore sucks ass */ nuclear@39: 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