# HG changeset patch # User Eric Wing # Date 1311988695 25200 # Node ID 5ec52341f221fef50c979c821d6e8ca98fb5da58 Initial commit diff -r 000000000000 -r 5ec52341f221 Classes/EAGLView.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Classes/EAGLView.h Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,37 @@ +// +// EAGLView.h +// MySampleProject +// +// Created by Eric Wing on 7/29/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + +#import +#import +#import +#import + +// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. +// The view content is basically an EAGL surface you render your OpenGL scene into. +// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. +@interface EAGLView : UIView +{ +@private + EAGLContext *context; + + // The pixel dimensions of the CAEAGLLayer. + GLint framebufferWidth; + GLint framebufferHeight; + + // The OpenGL ES names for the framebuffer and renderbuffer used to render to this view. + GLuint defaultFramebuffer, colorRenderbuffer; +} + +@property (nonatomic, retain) EAGLContext *context; + +- (void)setFramebuffer; +- (BOOL)presentFramebuffer; + +@end diff -r 000000000000 -r 5ec52341f221 Classes/EAGLView.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Classes/EAGLView.m Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,153 @@ +// +// EAGLView.m +// MySampleProject +// +// Created by Eric Wing on 7/29/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + +#import "EAGLView.h" + +@interface EAGLView (PrivateMethods) +- (void)createFramebuffer; +- (void)deleteFramebuffer; +@end + +@implementation EAGLView + +@dynamic context; + +// You must implement this method ++ (Class)layerClass +{ + return [CAEAGLLayer class]; +} + +//The EAGL view is stored in the nib file. When it's unarchived it's sent -initWithCoder:. +- (id)initWithCoder:(NSCoder*)coder +{ + self = [super initWithCoder:coder]; + if (self) + { + CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; + + eaglLayer.opaque = TRUE; + eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking, + kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, + nil]; + } + + return self; +} + +- (void)dealloc +{ + [self deleteFramebuffer]; + [context release]; + + [super dealloc]; +} + +- (EAGLContext *)context +{ + return context; +} + +- (void)setContext:(EAGLContext *)newContext +{ + if (context != newContext) + { + [self deleteFramebuffer]; + + [context release]; + context = [newContext retain]; + + [EAGLContext setCurrentContext:nil]; + } +} + +- (void)createFramebuffer +{ + if (context && !defaultFramebuffer) + { + [EAGLContext setCurrentContext:context]; + + // Create default framebuffer object. + glGenFramebuffers(1, &defaultFramebuffer); + glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer); + + // Create color render buffer and allocate backing store. + glGenRenderbuffers(1, &colorRenderbuffer); + glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); + [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer *)self.layer]; + glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &framebufferWidth); + glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &framebufferHeight); + + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer); + + if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) + NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER)); + } +} + +- (void)deleteFramebuffer +{ + if (context) + { + [EAGLContext setCurrentContext:context]; + + if (defaultFramebuffer) + { + glDeleteFramebuffers(1, &defaultFramebuffer); + defaultFramebuffer = 0; + } + + if (colorRenderbuffer) + { + glDeleteRenderbuffers(1, &colorRenderbuffer); + colorRenderbuffer = 0; + } + } +} + +- (void)setFramebuffer +{ + if (context) + { + [EAGLContext setCurrentContext:context]; + + if (!defaultFramebuffer) + [self createFramebuffer]; + + glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer); + + glViewport(0, 0, framebufferWidth, framebufferHeight); + } +} + +- (BOOL)presentFramebuffer +{ + BOOL success = FALSE; + + if (context) + { + [EAGLContext setCurrentContext:context]; + + glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); + + success = [context presentRenderbuffer:GL_RENDERBUFFER]; + } + + return success; +} + +- (void)layoutSubviews +{ + // The framebuffer will be re-created at the beginning of the next setFramebuffer method call. + [self deleteFramebuffer]; +} + +@end diff -r 000000000000 -r 5ec52341f221 Classes/MySampleProjectAppDelegate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Classes/MySampleProjectAppDelegate.h Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,22 @@ +// +// MySampleProjectAppDelegate.h +// MySampleProject +// +// Created by Eric Wing on 7/29/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + +@class MySampleProjectViewController; + +@interface MySampleProjectAppDelegate : NSObject { + UIWindow *window; + MySampleProjectViewController *viewController; +} + +@property (nonatomic, retain) IBOutlet UIWindow *window; +@property (nonatomic, retain) IBOutlet MySampleProjectViewController *viewController; + +@end + diff -r 000000000000 -r 5ec52341f221 Classes/MySampleProjectAppDelegate.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Classes/MySampleProjectAppDelegate.m Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,56 @@ +// +// MySampleProjectAppDelegate.m +// MySampleProject +// +// Created by Eric Wing on 7/29/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import "MySampleProjectAppDelegate.h" +#import "MySampleProjectViewController.h" + +@implementation MySampleProjectAppDelegate + +@synthesize window; +@synthesize viewController; + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.window.rootViewController = self.viewController; + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + [self.viewController stopAnimation]; +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + [self.viewController startAnimation]; +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + [self.viewController stopAnimation]; +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // Handle any background procedures not related to animation here. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + // Handle any foreground procedures not related to animation here. +} + +- (void)dealloc +{ + [viewController release]; + [window release]; + + [super dealloc]; +} + +@end diff -r 000000000000 -r 5ec52341f221 Classes/MySampleProjectViewController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Classes/MySampleProjectViewController.h Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,34 @@ +// +// MySampleProjectViewController.h +// MySampleProject +// +// Created by Eric Wing on 7/29/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + +#import + +#import +#import +#import +#import + +@interface MySampleProjectViewController : UIViewController +{ + EAGLContext *context; + GLuint program; + + BOOL animating; + NSInteger animationFrameInterval; + CADisplayLink *displayLink; +} + +@property (readonly, nonatomic, getter=isAnimating) BOOL animating; +@property (nonatomic) NSInteger animationFrameInterval; + +- (void)startAnimation; +- (void)stopAnimation; + +@end diff -r 000000000000 -r 5ec52341f221 Classes/MySampleProjectViewController.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Classes/MySampleProjectViewController.m Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,392 @@ +// +// MySampleProjectViewController.m +// MySampleProject +// +// Created by Eric Wing on 7/29/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + +#import "MySampleProjectViewController.h" +#import "EAGLView.h" + +// Uniform index. +enum { + UNIFORM_TRANSLATE, + NUM_UNIFORMS +}; +GLint uniforms[NUM_UNIFORMS]; + +// Attribute index. +enum { + ATTRIB_VERTEX, + ATTRIB_COLOR, + NUM_ATTRIBUTES +}; + +@interface MySampleProjectViewController () +@property (nonatomic, retain) EAGLContext *context; +@property (nonatomic, assign) CADisplayLink *displayLink; +- (BOOL)loadShaders; +- (BOOL)compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file; +- (BOOL)linkProgram:(GLuint)prog; +- (BOOL)validateProgram:(GLuint)prog; +@end + +@implementation MySampleProjectViewController + +@synthesize animating, context, displayLink; + +- (void)awakeFromNib +{ +#if USE_OPENGLES2 + EAGLContext* aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; +#else + EAGLContext* aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1]; +#endif + + if (!aContext) + NSLog(@"Failed to create ES context"); + else if (![EAGLContext setCurrentContext:aContext]) + NSLog(@"Failed to set ES context current"); + + self.context = aContext; + [aContext release]; + + [(EAGLView *)self.view setContext:context]; + [(EAGLView *)self.view setFramebuffer]; + +#if USE_OPENGLES2 + if ([context API] == kEAGLRenderingAPIOpenGLES2) + [self loadShaders]; +#endif + + animating = FALSE; + animationFrameInterval = 1; + self.displayLink = nil; +} + +- (void)dealloc +{ + if (program) + { + glDeleteProgram(program); + program = 0; + } + + // Tear down context. + if ([EAGLContext currentContext] == context) + [EAGLContext setCurrentContext:nil]; + + [context release]; + + [super dealloc]; +} + +- (void)viewWillAppear:(BOOL)animated +{ + [self startAnimation]; + + [super viewWillAppear:animated]; +} + +- (void)viewWillDisappear:(BOOL)animated +{ + [self stopAnimation]; + + [super viewWillDisappear:animated]; +} + +- (void)viewDidUnload +{ + [super viewDidUnload]; + + if (program) + { + glDeleteProgram(program); + program = 0; + } + + // Tear down context. + if ([EAGLContext currentContext] == context) + [EAGLContext setCurrentContext:nil]; + self.context = nil; +} + +- (NSInteger)animationFrameInterval +{ + return animationFrameInterval; +} + +- (void)setAnimationFrameInterval:(NSInteger)frameInterval +{ + /* + Frame interval defines how many display frames must pass between each time the display link fires. + The display link will only fire 30 times a second when the frame internal is two on a display that refreshes 60 times a second. The default frame interval setting of one will fire 60 times a second when the display refreshes at 60 times a second. A frame interval setting of less than one results in undefined behavior. + */ + if (frameInterval >= 1) + { + animationFrameInterval = frameInterval; + + if (animating) + { + [self stopAnimation]; + [self startAnimation]; + } + } +} + +- (void)startAnimation +{ + if (!animating) + { + CADisplayLink *aDisplayLink = [[UIScreen mainScreen] displayLinkWithTarget:self selector:@selector(drawFrame)]; + [aDisplayLink setFrameInterval:animationFrameInterval]; + [aDisplayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; + self.displayLink = aDisplayLink; + + animating = TRUE; + } +} + +- (void)stopAnimation +{ + if (animating) + { + [self.displayLink invalidate]; + self.displayLink = nil; + animating = FALSE; + } +} + +- (void)drawFrame +{ + [(EAGLView *)self.view setFramebuffer]; + + // Replace the implementation of this method to do your own custom drawing. + static const GLfloat squareVertices[] = { + -0.5f, -0.33f, + 0.5f, -0.33f, + -0.5f, 0.33f, + 0.5f, 0.33f, + }; + + static const GLubyte squareColors[] = { + 255, 255, 0, 255, + 0, 255, 255, 255, + 0, 0, 0, 0, + 255, 0, 255, 255, + }; + + static float transY = 0.0f; + + glClearColor(0.5f, 0.5f, 0.5f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + +#if USE_OPENGLES2 + // Use shader program. + glUseProgram(program); + + // Update uniform value. + glUniform1f(uniforms[UNIFORM_TRANSLATE], (GLfloat)transY); + transY += 0.075f; + + // Update attribute values. + glVertexAttribPointer(ATTRIB_VERTEX, 2, GL_FLOAT, 0, 0, squareVertices); + glEnableVertexAttribArray(ATTRIB_VERTEX); + glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, 1, 0, squareColors); + glEnableVertexAttribArray(ATTRIB_COLOR); + + // Validate program before drawing. This is a good check, but only really necessary in a debug build. + // DEBUG macro must be defined in your debug configurations if that's not already the case. +#if defined(DEBUG) + if (![self validateProgram:program]) + { + NSLog(@"Failed to validate program: %d", program); + return; + } +#endif +#else + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0f, (GLfloat)(sinf(transY)/2.0f), 0.0f); + transY += 0.075f; + + glVertexPointer(2, GL_FLOAT, 0, squareVertices); + glEnableClientState(GL_VERTEX_ARRAY); + glColorPointer(4, GL_UNSIGNED_BYTE, 0, squareColors); + glEnableClientState(GL_COLOR_ARRAY); +#endif + + glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); + + [(EAGLView *)self.view presentFramebuffer]; +} + +- (void)didReceiveMemoryWarning +{ + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc. that aren't in use. +} + +- (BOOL)compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file +{ + GLint status; + const GLchar *source; + + source = (GLchar *)[[NSString stringWithContentsOfFile:file encoding:NSUTF8StringEncoding error:nil] UTF8String]; + if (!source) + { + NSLog(@"Failed to load vertex shader"); + return FALSE; + } + + *shader = glCreateShader(type); + glShaderSource(*shader, 1, &source, NULL); + glCompileShader(*shader); + +#if defined(DEBUG) + GLint logLength; + glGetShaderiv(*shader, GL_INFO_LOG_LENGTH, &logLength); + if (logLength > 0) + { + GLchar *log = (GLchar *)malloc(logLength); + glGetShaderInfoLog(*shader, logLength, &logLength, log); + NSLog(@"Shader compile log:\n%s", log); + free(log); + } +#endif + + glGetShaderiv(*shader, GL_COMPILE_STATUS, &status); + if (status == 0) + { + glDeleteShader(*shader); + return FALSE; + } + + return TRUE; +} + +- (BOOL)linkProgram:(GLuint)prog +{ + GLint status; + + glLinkProgram(prog); + +#if defined(DEBUG) + GLint logLength; + glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength); + if (logLength > 0) + { + GLchar *log = (GLchar *)malloc(logLength); + glGetProgramInfoLog(prog, logLength, &logLength, log); + NSLog(@"Program link log:\n%s", log); + free(log); + } +#endif + + glGetProgramiv(prog, GL_LINK_STATUS, &status); + if (status == 0) + return FALSE; + + return TRUE; +} + +- (BOOL)validateProgram:(GLuint)prog +{ + GLint logLength, status; + + glValidateProgram(prog); + glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength); + if (logLength > 0) + { + GLchar *log = (GLchar *)malloc(logLength); + glGetProgramInfoLog(prog, logLength, &logLength, log); + NSLog(@"Program validate log:\n%s", log); + free(log); + } + + glGetProgramiv(prog, GL_VALIDATE_STATUS, &status); + if (status == 0) + return FALSE; + + return TRUE; +} + +- (BOOL)loadShaders +{ + GLuint vertShader, fragShader; + NSString *vertShaderPathname, *fragShaderPathname; + + // Create shader program. + program = glCreateProgram(); + + // Create and compile vertex shader. + vertShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"vsh"]; + if (![self compileShader:&vertShader type:GL_VERTEX_SHADER file:vertShaderPathname]) + { + NSLog(@"Failed to compile vertex shader"); + return FALSE; + } + + // Create and compile fragment shader. + fragShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"fsh"]; + if (![self compileShader:&fragShader type:GL_FRAGMENT_SHADER file:fragShaderPathname]) + { + NSLog(@"Failed to compile fragment shader"); + return FALSE; + } + + // Attach vertex shader to program. + glAttachShader(program, vertShader); + + // Attach fragment shader to program. + glAttachShader(program, fragShader); + + // Bind attribute locations. + // This needs to be done prior to linking. + glBindAttribLocation(program, ATTRIB_VERTEX, "position"); + glBindAttribLocation(program, ATTRIB_COLOR, "color"); + + // Link program. + if (![self linkProgram:program]) + { + NSLog(@"Failed to link program: %d", program); + + if (vertShader) + { + glDeleteShader(vertShader); + vertShader = 0; + } + if (fragShader) + { + glDeleteShader(fragShader); + fragShader = 0; + } + if (program) + { + glDeleteProgram(program); + program = 0; + } + + return FALSE; + } + + // Get uniform locations. + uniforms[UNIFORM_TRANSLATE] = glGetUniformLocation(program, "translate"); + + // Release vertex and fragment shaders. + if (vertShader) + glDeleteShader(vertShader); + if (fragShader) + glDeleteShader(fragShader); + + return TRUE; +} + +@end diff -r 000000000000 -r 5ec52341f221 MainWindow.xib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MainWindow.xib Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,485 @@ + + + + 1056 + 10H542 + 804 + 1038.35 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 131 + + + YES + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + IBCocoaTouchFramework + + + MySampleProjectViewController + + 1 + + YES + IBCocoaTouchFramework + NO + + + + 1316 + + {320, 480} + + 1 + MSAxIDEAA + + NO + IBCocoaTouchFramework + YES + YES + + + + + YES + + + delegate + + + + 4 + + + + window + + + + 5 + + + + viewController + + + + 12 + + + + + YES + + 0 + + + + + + 2 + + + YES + + + + + -1 + + + File's Owner + + + 3 + + + + + -2 + + + + + 10 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 10.CustomClassName + 10.IBEditorWindowLastContentRect + 10.IBPluginDependency + 2.IBAttributePlaceholdersKey + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 3.CustomClassName + 3.IBPluginDependency + + + YES + UIApplication + UIResponder + MySampleProjectViewController + {{415, 586}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + YES + + + YES + + + {{400, 376}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MySampleProjectAppDelegate + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 12 + + + + YES + + MySampleProjectAppDelegate + NSObject + + YES + + YES + viewController + window + + + YES + MySampleProjectViewController + UIWindow + + + + YES + + YES + viewController + window + + + YES + + viewController + MySampleProjectViewController + + + window + UIWindow + + + + + IBProjectSource + Classes/MySampleProjectAppDelegate.h + + + + MySampleProjectAppDelegate + NSObject + + IBUserSource + + + + + MySampleProjectViewController + UIViewController + + displayLink + id + + + displayLink + + displayLink + id + + + + IBProjectSource + Classes/MySampleProjectViewController.h + + + + MySampleProjectViewController + UIViewController + + IBUserSource + + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIApplication + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIApplication.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIPrintFormatter.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + UIWindow + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIWindow.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + MySampleProject.xcodeproj + 3 + 131 + + diff -r 000000000000 -r 5ec52341f221 MySampleProject-Info copy.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MySampleProject-Info copy.plist Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NSMainNibFile + MainWindow + UIStatusBarHidden + + + diff -r 000000000000 -r 5ec52341f221 MySampleProject-Info.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MySampleProject-Info.plist Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NSMainNibFile + MainWindow + UIStatusBarHidden + + + diff -r 000000000000 -r 5ec52341f221 MySampleProject.xcodeproj/project.pbxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MySampleProject.xcodeproj/project.pbxproj Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,393 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 00841E4E13E3929C00091BB8 /* Shader.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 2514C27910084DCA00A42282 /* Shader.fsh */; }; + 00841E4F13E3929C00091BB8 /* Shader.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 2514C27A10084DCA00A42282 /* Shader.vsh */; }; + 00841E5013E3929C00091BB8 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; + 00841E5113E3929C00091BB8 /* MySampleProjectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28EC4C5811D54ECE0027AA9F /* MySampleProjectViewController.xib */; }; + 00841E5313E3929C00091BB8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + 00841E5413E3929C00091BB8 /* MySampleProjectAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* MySampleProjectAppDelegate.m */; }; + 00841E5513E3929C00091BB8 /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 28FD14FD0DC6FC130079059D /* EAGLView.m */; }; + 00841E5613E3929C00091BB8 /* MySampleProjectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28EC4C5711D54ECE0027AA9F /* MySampleProjectViewController.m */; }; + 00841E5813E3929C00091BB8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 00841E5913E3929C00091BB8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 00841E5A13E3929C00091BB8 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; + 00841E5B13E3929C00091BB8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; + 1D3623260D0F684500981E51 /* MySampleProjectAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* MySampleProjectAppDelegate.m */; }; + 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 2514C27B10084DCA00A42282 /* Shader.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 2514C27910084DCA00A42282 /* Shader.fsh */; }; + 2514C27C10084DCA00A42282 /* Shader.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 2514C27A10084DCA00A42282 /* Shader.vsh */; }; + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; + 28EC4C5911D54ECE0027AA9F /* MySampleProjectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28EC4C5711D54ECE0027AA9F /* MySampleProjectViewController.m */; }; + 28EC4C5A11D54ECE0027AA9F /* MySampleProjectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28EC4C5811D54ECE0027AA9F /* MySampleProjectViewController.xib */; }; + 28FD14FE0DC6FC130079059D /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 28FD14FD0DC6FC130079059D /* EAGLView.m */; }; + 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; + 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 00841E5F13E3929C00091BB8 /* OpenGLES2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenGLES2.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 00841E6113E3929C00091BB8 /* MySampleProject-Info copy.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MySampleProject-Info copy.plist"; sourceTree = ""; }; + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D3623240D0F684500981E51 /* MySampleProjectAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MySampleProjectAppDelegate.h; sourceTree = ""; }; + 1D3623250D0F684500981E51 /* MySampleProjectAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MySampleProjectAppDelegate.m; sourceTree = ""; }; + 1D6058910D05DD3D006BFB54 /* OpenGLES1.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenGLES1.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 2514C27910084DCA00A42282 /* Shader.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Shader.fsh; path = Shaders/Shader.fsh; sourceTree = ""; }; + 2514C27A10084DCA00A42282 /* Shader.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Shader.vsh; path = Shaders/Shader.vsh; sourceTree = ""; }; + 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; + 28EC4C5611D54ECE0027AA9F /* MySampleProjectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MySampleProjectViewController.h; sourceTree = ""; }; + 28EC4C5711D54ECE0027AA9F /* MySampleProjectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MySampleProjectViewController.m; sourceTree = ""; }; + 28EC4C5811D54ECE0027AA9F /* MySampleProjectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MySampleProjectViewController.xib; sourceTree = ""; }; + 28FD14FC0DC6FC130079059D /* EAGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EAGLView.h; sourceTree = ""; }; + 28FD14FD0DC6FC130079059D /* EAGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EAGLView.m; sourceTree = ""; }; + 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 32CA4F630368D1EE00C91783 /* MySampleProject_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MySampleProject_Prefix.pch; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* MySampleProject-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MySampleProject-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00841E5713E3929C00091BB8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 00841E5813E3929C00091BB8 /* Foundation.framework in Frameworks */, + 00841E5913E3929C00091BB8 /* UIKit.framework in Frameworks */, + 00841E5A13E3929C00091BB8 /* OpenGLES.framework in Frameworks */, + 00841E5B13E3929C00091BB8 /* QuartzCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, + 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 28FD14FC0DC6FC130079059D /* EAGLView.h */, + 28FD14FD0DC6FC130079059D /* EAGLView.m */, + 1D3623240D0F684500981E51 /* MySampleProjectAppDelegate.h */, + 1D3623250D0F684500981E51 /* MySampleProjectAppDelegate.m */, + 28EC4C5611D54ECE0027AA9F /* MySampleProjectViewController.h */, + 28EC4C5711D54ECE0027AA9F /* MySampleProjectViewController.m */, + ); + path = Classes; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* OpenGLES1.app */, + 00841E5F13E3929C00091BB8 /* OpenGLES2.app */, + ); + name = Products; + sourceTree = ""; + }; + 2514C27610084DB600A42282 /* Shaders */ = { + isa = PBXGroup; + children = ( + 2514C27910084DCA00A42282 /* Shader.fsh */, + 2514C27A10084DCA00A42282 /* Shader.vsh */, + ); + name = Shaders; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* Classes */, + 2514C27610084DB600A42282 /* Shaders */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32CA4F630368D1EE00C91783 /* MySampleProject_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 28EC4C5811D54ECE0027AA9F /* MySampleProjectViewController.xib */, + 28AD733E0D9D9553002E5188 /* MainWindow.xib */, + 8D1107310486CEB800E47090 /* MySampleProject-Info.plist */, + 00841E6113E3929C00091BB8 /* MySampleProject-Info copy.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, + 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 00841E4C13E3929C00091BB8 /* OpenGLES2 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00841E5C13E3929C00091BB8 /* Build configuration list for PBXNativeTarget "OpenGLES2" */; + buildPhases = ( + 00841E4D13E3929C00091BB8 /* Resources */, + 00841E5213E3929C00091BB8 /* Sources */, + 00841E5713E3929C00091BB8 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = OpenGLES2; + productName = MySampleProject; + productReference = 00841E5F13E3929C00091BB8 /* OpenGLES2.app */; + productType = "com.apple.product-type.application"; + }; + 1D6058900D05DD3D006BFB54 /* OpenGLES1 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "OpenGLES1" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = OpenGLES1; + productName = MySampleProject; + productReference = 1D6058910D05DD3D006BFB54 /* OpenGLES1.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MySampleProject" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* OpenGLES1 */, + 00841E4C13E3929C00091BB8 /* OpenGLES2 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 00841E4D13E3929C00091BB8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00841E4E13E3929C00091BB8 /* Shader.fsh in Resources */, + 00841E4F13E3929C00091BB8 /* Shader.vsh in Resources */, + 00841E5013E3929C00091BB8 /* MainWindow.xib in Resources */, + 00841E5113E3929C00091BB8 /* MySampleProjectViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2514C27B10084DCA00A42282 /* Shader.fsh in Resources */, + 2514C27C10084DCA00A42282 /* Shader.vsh in Resources */, + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, + 28EC4C5A11D54ECE0027AA9F /* MySampleProjectViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 00841E5213E3929C00091BB8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00841E5313E3929C00091BB8 /* main.m in Sources */, + 00841E5413E3929C00091BB8 /* MySampleProjectAppDelegate.m in Sources */, + 00841E5513E3929C00091BB8 /* EAGLView.m in Sources */, + 00841E5613E3929C00091BB8 /* MySampleProjectViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* MySampleProjectAppDelegate.m in Sources */, + 28FD14FE0DC6FC130079059D /* EAGLView.m in Sources */, + 28EC4C5911D54ECE0027AA9F /* MySampleProjectViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 00841E5D13E3929C00091BB8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = MySampleProject_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + USE_OPENGLES2, + DEBUG, + ); + INFOPLIST_FILE = "MySampleProject-Info copy.plist"; + PRODUCT_NAME = OpenGLES2; + }; + name = Debug; + }; + 00841E5E13E3929C00091BB8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = MySampleProject_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = USE_OPENGLES2; + INFOPLIST_FILE = "MySampleProject-Info copy.plist"; + PRODUCT_NAME = OpenGLES2; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = MySampleProject_Prefix.pch; + INFOPLIST_FILE = "MySampleProject-Info.plist"; + PRODUCT_NAME = OpenGLES1; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = MySampleProject_Prefix.pch; + INFOPLIST_FILE = "MySampleProject-Info.plist"; + PRODUCT_NAME = OpenGLES1; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_PREPROCESSOR_DEFINITIONS = DEBUG; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = iphoneos; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PREBINDING = NO; + SDKROOT = iphoneos; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00841E5C13E3929C00091BB8 /* Build configuration list for PBXNativeTarget "OpenGLES2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00841E5D13E3929C00091BB8 /* Debug */, + 00841E5E13E3929C00091BB8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "OpenGLES1" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MySampleProject" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff -r 000000000000 -r 5ec52341f221 MySampleProjectViewController.xib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MySampleProjectViewController.xib Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,389 @@ + + + + 1024 + 10F569 + 800 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 121 + + + YES + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + {320, 460} + + 3 + MQA + + 2 + + + NO + IBCocoaTouchFramework + + + + + YES + + + view + + + + 3 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 2.CustomClassName + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + + + YES + MySampleProjectViewController + UIResponder + EAGLView + {{401, 662}, {320, 460}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 4 + + + + YES + + EAGLView + UIView + + drawView: + id + + + drawView: + + drawView: + id + + + + YES + + YES + displayLink + renderer + + + YES + id + id + + + + YES + + YES + displayLink + renderer + + + YES + + displayLink + id + + + renderer + id + + + + + IBProjectSource + Classes/EAGLView.h + + + + MySampleProjectViewController + UIViewController + + IBUserSource + + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + Untitled.xcodeproj + 3 + 121 + + diff -r 000000000000 -r 5ec52341f221 MySampleProject_Prefix.pch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MySampleProject_Prefix.pch Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,14 @@ +// +// Prefix header for all source files of the 'MySampleProject' target in the 'MySampleProject' project +// + +#import + +#ifndef __IPHONE_3_0 +#warning "This project uses features only available in iPhone SDK 3.0 and later." +#endif + +#ifdef __OBJC__ +#import +#import +#endif diff -r 000000000000 -r 5ec52341f221 Shaders/Shader.fsh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Shaders/Shader.fsh Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,14 @@ +// +// Shader.fsh +// MySampleProject +// +// Created by Eric Wing on 7/29/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +varying lowp vec4 colorVarying; + +void main() +{ + gl_FragColor = colorVarying; +} diff -r 000000000000 -r 5ec52341f221 Shaders/Shader.vsh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Shaders/Shader.vsh Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,22 @@ +// +// Shader.vsh +// MySampleProject +// +// Created by Eric Wing on 7/29/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +attribute vec4 position; +attribute vec4 color; + +varying vec4 colorVarying; + +uniform float translate; + +void main() +{ + gl_Position = position; + gl_Position.y += sin(translate) / 2.0; + + colorVarying = color; +} diff -r 000000000000 -r 5ec52341f221 main.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.m Fri Jul 29 18:18:15 2011 -0700 @@ -0,0 +1,17 @@ +// +// main.m +// MySampleProject +// +// Created by Eric Wing on 7/29/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, nil); + [pool release]; + return retVal; +}