Skip to content
Browse files

Added simple per-vertex directional lighting example

  • Loading branch information...
1 parent 724d2cb commit fb153560ba3ace6e0801343daf84767b3912e77f jlamarche committed Oct 20, 2010
Showing with 13,933 additions and 1 deletion.
  1. +1 −1 Blender Export/objc-export-2.5/objc_blend2_5.py
  2. +302 −0 Simple Per-Vertex Directional Lighting/Classes/GLCommon.h
  3. +18 −0 Simple Per-Vertex Directional Lighting/Classes/GLProgram.h
  4. +182 −0 Simple Per-Vertex Directional Lighting/Classes/GLProgram.m
  5. +22 −0 Simple Per-Vertex Directional Lighting/Classes/GLTexture.h
  6. +81 −0 Simple Per-Vertex Directional Lighting/Classes/GLTexture.m
  7. +17 −0 Simple Per-Vertex Directional Lighting/Classes/GLView.h
  8. +189 −0 Simple Per-Vertex Directional Lighting/Classes/GLView.m
  9. +14 −0 Simple Per-Vertex Directional Lighting/Classes/GLViewController.h
  10. +334 −0 Simple Per-Vertex Directional Lighting/Classes/GLViewController.m
  11. +20 −0 Simple Per-Vertex Directional Lighting/Classes/Hello_GLAppDelegate.h
  12. +27 −0 Simple Per-Vertex Directional Lighting/Classes/Hello_GLAppDelegate.m
  13. BIN Simple Per-Vertex Directional Lighting/DieTexture.png
  14. +30 −0 Simple Per-Vertex Directional Lighting/Hello_GL-Info.plist
  15. +9 −0 Simple Per-Vertex Directional Lighting/Hello_GL_Prefix.pch
  16. BIN Simple Per-Vertex Directional Lighting/IcoTexture.jpg
  17. +379 −0 Simple Per-Vertex Directional Lighting/Icosahedron.xcodeproj/jeff.pbxuser
  18. +1,530 −0 Simple Per-Vertex Directional Lighting/Icosahedron.xcodeproj/jeff.perspectivev3
  19. +312 −0 Simple Per-Vertex Directional Lighting/Icosahedron.xcodeproj/project.pbxproj
  20. +6 −0 ...er-Vertex Directional Lighting/Icosahedron.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  21. +10,049 −0 .../Icosahedron.xcodeproj/project.xcworkspace/xcuserdata/jeff.xcuserdatad/WorkspaceState.xcuserstate
  22. +4 −0 ...l Lighting/Icosahedron.xcodeproj/xcuserdata/jeff.xcuserdatad/xcbreakpoints/Breakpoints.xcbkptlist
  23. +18 −0 ...onal Lighting/Icosahedron.xcodeproj/xcuserdata/jeff.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  24. +46 −0 ...irectional Lighting/Icosahedron.xcodeproj/xcuserdata/jeff.xcuserdatad/xcschemes/Hello GL.xcscheme
  25. +22 −0 ...nal Lighting/Icosahedron.xcodeproj/xcuserdata/jeff.xcuserdatad/xcschemes/xcschememanagement.plist
  26. +270 −0 Simple Per-Vertex Directional Lighting/MainWindow.xib
  27. +7 −0 Simple Per-Vertex Directional Lighting/Shader.fsh
  28. +27 −0 Simple Per-Vertex Directional Lighting/Shader.vsh
  29. +17 −0 Simple Per-Vertex Directional Lighting/main.m
View
2 Blender Export/objc-export-2.5/objc_blend2_5.py
@@ -8,7 +8,7 @@
'name': 'Export: Objective C header (.h)',
'author': 'Jeff, Paul',
'version': '1.0',
- 'blender': (2, 5, 3),
+ 'blender': (2, 5, 4),
'location': 'File > Export',
'description': 'Export Objective C header file (.h)',
'warning': '', # used for warning icon and text in addons panel
View
302 Simple Per-Vertex Directional Lighting/Classes/GLCommon.h
@@ -0,0 +1,302 @@
+#define DEGREES_TO_RADIANS(x) ((x) / 180.0 * M_PI)
+#define RADIANS_TO_DEGREES(x) ((x) / M_PI * 180.0)
+
+typedef struct
+{
+ GLfloat x;
+ GLfloat y;
+ GLfloat z;
+} Vertex3D;
+
+typedef Vertex3D Vector3D;
+
+static inline GLfloat Vertex3DDistanceBetweenVertices
+ (Vertex3D vertex1, Vertex3D vertex2)
+{
+ GLfloat deltaX, deltaY, deltaZ;
+
+ deltaX = vertex2.x - vertex1.x;
+ deltaY = vertex2.y - vertex1.y;
+ deltaZ = vertex2.z - vertex1.z;
+
+ return sqrtf((deltaX * deltaX) +
+ (deltaY * deltaY) +
+ (deltaZ * deltaZ));
+}
+static inline GLfloat Vector3DMagnitude(Vector3D vector)
+{
+ return sqrtf((vector.x * vector.x) +
+ (vector.y * vector.y) +
+ (vector.z * vector.z));
+}
+static inline GLfloat Vector3DDotProduct
+(Vector3D vector1, Vector3D vector2)
+{
+ return (vector1.x*vector2.x) +
+ (vector1.y*vector2.y) +
+ (vector1.z*vector2.z);
+}
+static inline Vector3D Vector3DCrossProduct
+ (Vector3D vector1, Vector3D vector2)
+{
+ Vector3D ret;
+ ret.x = (vector1.y * vector2.z) - (vector1.z * vector2.y);
+ ret.y = (vector1.z * vector2.x) - (vector1.x * vector2.z);
+ ret.z = (vector1.x * vector2.y) - (vector1.y * vector2.x);
+ return ret;
+}
+static inline void Vector3DNormalize(Vector3D *vector)
+{
+ GLfloat vecMag = Vector3DMagnitude(*vector);
+ if ( vecMag == 0.0 )
+ {
+ vector->x = 1.0;
+ vector->y = 0.0;
+ vector->z = 0.0;
+ return;
+ }
+ vector->x /= vecMag;
+ vector->y /= vecMag;
+ vector->z /= vecMag;
+}
+static inline Vector3D Vector3DMakeWithStartAndEndPoints
+(Vertex3D start, Vertex3D end)
+{
+ Vector3D ret;
+ ret.x = end.x - start.x;
+ ret.y = end.y - start.y;
+ ret.z = end.z - start.z;
+ return ret;
+}
+static inline Vector3D Vector3DMakeNormalizedVectorWithStartAndEndPoints
+(Vertex3D start, Vertex3D end)
+{
+ Vector3D ret = Vector3DMakeWithStartAndEndPoints(start, end);
+ Vector3DNormalize(&ret);
+ return ret;
+}
+static inline void Vector3DFlip (Vector3D *vector)
+{
+ vector->x = -vector->x;
+ vector->y = -vector->y;
+ vector->z = -vector->z;
+}
+typedef struct {
+ GLfloat red;
+ GLfloat green;
+ GLfloat blue;
+ GLfloat alpha;
+} Color;
+typedef GLfloat Matrix3D[16];
+static inline void Matrix3DSetIdentity(Matrix3D matrix)
+{
+ matrix[0] = matrix[5] = matrix[10] = matrix[15] = 1.0;
+ matrix[1] = matrix[2] = matrix[3] = matrix[4] = 0.0;
+ matrix[6] = matrix[7] = matrix[8] = matrix[9] = 0.0;
+ matrix[11] = matrix[12] = matrix[13] = matrix[14] = 0.0;
+}
+static inline void Matrix3DSetTranslation
+ (Matrix3D matrix, GLfloat xTranslate,
+ GLfloat yTranslate, GLfloat zTranslate)
+{
+ matrix[0] = matrix[5] = matrix[10] = matrix[15] = 1.0;
+ matrix[1] = matrix[2] = matrix[3] = matrix[4] = 0.0;
+ matrix[6] = matrix[7] = matrix[8] = matrix[9] = 0.0;
+ matrix[11] = 0.0;
+ matrix[12] = xTranslate;
+ matrix[13] = yTranslate;
+ matrix[14] = zTranslate;
+}
+static inline void Matrix3DSetScaling
+ (Matrix3D matrix, GLfloat xScale,
+ GLfloat yScale, GLfloat zScale)
+{
+ matrix[1] = matrix[2] = matrix[3] = matrix[4] = 0.0;
+ matrix[6] = matrix[7] = matrix[8] = matrix[9] = 0.0;
+ matrix[11] = matrix[12] = matrix[13] = matrix[14] = 0.0;
+ matrix[0] = xScale;
+ matrix[5] = yScale;
+ matrix[10] = zScale;
+ matrix[15] = 1.0;
+}
+static inline void Matrix3DSetUniformScaling
+ (Matrix3D matrix, GLfloat scale)
+{
+ Matrix3DSetScaling(matrix, scale, scale, scale);
+}
+static inline void Matrix3DSetZRotationUsingRadians
+ (Matrix3D matrix, GLfloat radians)
+{
+ matrix[0] = cosf(radians);
+ matrix[1] = sinf(radians);
+ matrix[4] = -matrix[1];
+ matrix[5] = matrix[0];
+ matrix[2] = matrix[3] = matrix[6] = matrix[7] = matrix[8] = 0.0;
+ matrix[9] = matrix[11] = matrix[12] = matrix[13] = matrix[14] = 0.0;
+ matrix[10] = matrix[15] = 1.0;
+}
+static inline void Matrix3DSetZRotationUsingDegrees
+ (Matrix3D matrix, GLfloat degrees)
+{
+ Matrix3DSetZRotationUsingRadians(matrix, DEGREES_TO_RADIANS(degrees));
+}
+static inline void Matrix3DSetXRotationUsingRadians
+(Matrix3D matrix, GLfloat radians)
+{
+ matrix[0] = matrix[15] = 1.0;
+ matrix[1] = matrix[2] = matrix[3] = matrix[4] = 0.0;
+ matrix[7] = matrix[8] = 0.0;
+ matrix[11] = matrix[12] = matrix[13] = matrix[14] = 0.0;
+
+ matrix[5] = cosf(radians);
+ matrix[6] = -sinf(radians);
+ matrix[9] = -matrix[6];
+ matrix[10] = matrix[5];
+}
+static inline void Matrix3DSetXRotationUsingDegrees
+(Matrix3D matrix, GLfloat degrees)
+{
+ Matrix3DSetXRotationUsingRadians(matrix,DEGREES_TO_RADIANS(degrees));
+}
+static inline void Matrix3DSetYRotationUsingRadians
+(Matrix3D matrix, GLfloat radians)
+{
+ matrix[0] = cosf(radians);
+ matrix[2] = sinf(radians);
+ matrix[8] = -matrix[2];
+ matrix[10] = matrix[0];
+ matrix[1] = matrix[3] = matrix[4] = matrix[6] = matrix[7] = 0.0;
+ matrix[9] = matrix[11] = matrix[13] = matrix[12] = matrix[14] = 0.0;
+ matrix[5] = matrix[15] = 1.0;
+}
+static inline void Matrix3DSetYRotationUsingDegrees
+(Matrix3D matrix, GLfloat degrees)
+{
+ Matrix3DSetYRotationUsingRadians(matrix, DEGREES_TO_RADIANS(degrees));
+}
+static inline void Matrix3DSetRotationByRadians
+(Matrix3D matrix, GLfloat radians, Vector3D vector)
+{
+ GLfloat mag = sqrtf((vector.x * vector.x) +
+ (vector.y * vector.y) +
+ (vector.z * vector.z));
+ if (mag == 0.0)
+ {
+ vector.x = 1.0;
+ vector.y = 0.0;
+ vector.z = 0.0;
+ }
+ else if (mag != 1.0)
+ {
+ vector.x /= mag;
+ vector.y /= mag;
+ vector.z /= mag;
+ }
+
+ GLfloat c = cosf(radians);
+ GLfloat s = sinf(radians);
+ matrix[3] = matrix[7] = matrix[11] = 0.0;
+ matrix[12] = matrix[13] = matrix[14] = 0.0;
+ matrix[15] = 1.0;
+
+ matrix[0] = (vector.x * vector.x) * (1-c) + c;
+ matrix[1] = (vector.y * vector.x) * (1-c) + (vector.z * s);
+ matrix[2] = (vector.x * vector.z) * (1-c) - (vector.y * s);
+ matrix[4] = (vector.x * vector.y) * (1-c) - (vector.z * s);
+ matrix[5] = (vector.y * vector.y) * (1-c) + c;
+ matrix[6] = (vector.y * vector.z) * (1 - c) + (vector.x*s);
+ matrix[8] = (vector.x * vector.z) * (1 - c) + (vector.y*s);
+ matrix[9] = (vector.y * vector.z) * (1 - c) - (vector.x*s);
+ matrix[10] = (vector.z * vector.z) * (1 - c) + c;
+}
+static inline void Matrix3DSetRotationByDegrees
+ (Matrix3D matrix, GLfloat degrees, Vector3D vec)
+{
+ Matrix3DSetRotationByRadians(matrix, DEGREES_TO_RADIANS(degrees), vec);
+}
+static inline void Matrix3DMultiply(Matrix3D m1, Matrix3D m2, Matrix3D result)
+{
+ result[0] = m1[0] * m2[0] + m1[4] * m2[1]
+ + m1[8] * m2[2] + m1[12] * m2[3];
+ result[1] = m1[1] * m2[0] + m1[5] * m2[1]
+ + m1[9] * m2[2] + m1[13] * m2[3];
+ result[2] = m1[2] * m2[0] + m1[6] * m2[1]
+ + m1[10] * m2[2] + m1[14] * m2[3];
+ result[3] = m1[3] * m2[0] + m1[7] * m2[1]
+ + m1[11] * m2[2] + m1[15] * m2[3];
+
+ result[4] = m1[0] * m2[4] + m1[4] * m2[5]
+ + m1[8] * m2[6] + m1[12] * m2[7];
+ result[5] = m1[1] * m2[4] + m1[5] * m2[5]
+ + m1[9] * m2[6] + m1[13] * m2[7];
+ result[6] = m1[2] * m2[4] + m1[6] * m2[5]
+ + m1[10] * m2[6] + m1[14] * m2[7];
+ result[7] = m1[3] * m2[4] + m1[7] * m2[5]
+ + m1[11] * m2[6] + m1[15] * m2[7];
+
+ result[8] = m1[0] * m2[8] + m1[4] * m2[9]
+ + m1[8] * m2[10] + m1[12] * m2[11];
+ result[9] = m1[1] * m2[8] + m1[5] * m2[9]
+ + m1[9] * m2[10] + m1[13] * m2[11];
+ result[10] = m1[2] * m2[8] + m1[6] * m2[9]
+ + m1[10] * m2[10] + m1[14] * m2[11];
+ result[11] = m1[3] * m2[8] + m1[7] * m2[9]
+ + m1[11] * m2[10] + m1[15] * m2[11];
+
+ result[12] = m1[0] * m2[12] + m1[4] * m2[13]
+ + m1[8] * m2[14] + m1[12] * m2[15];
+ result[13] = m1[1] * m2[12] + m1[5] * m2[13]
+ + m1[9] * m2[14] + m1[13] * m2[15];
+ result[14] = m1[2] * m2[12] + m1[6] * m2[13]
+ + m1[10] * m2[14] + m1[14] * m2[15];
+ result[15] = m1[3] * m2[12] + m1[7] * m2[13]
+ + m1[11] * m2[14] + m1[15] * m2[15];
+}
+static inline void Matrix3DSetOrthoProjection(Matrix3D matrix, GLfloat left,
+ GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far)
+{
+ matrix[1] = matrix[2] = matrix[3] = matrix[4] = matrix[6] = 0.f;
+ matrix[7] = matrix[8] = matrix[9] = matrix[11] = 0.f;
+ matrix[0] = 2.f / (right - left);
+ matrix[5] = 2.f / (top - bottom);
+ matrix[10] = -2.f / (far - near);
+ matrix[12] = (right + left) / (right - left);
+ matrix[13] = (top + bottom) / (top - bottom);
+ matrix[14] = (far + near) / (far - near);
+ matrix[15] = 1.f;
+}
+static inline void Matrix3DSetFrustumProjection(Matrix3D matrix,
+ GLfloat left, GLfloat right,
+ GLfloat bottom, GLfloat top,
+ GLfloat zNear, GLfloat zFar)
+{
+ matrix[1] = matrix[2] = matrix[3] = matrix[4] = 0.f;
+ matrix[6] = matrix[7] = matrix[12] = matrix[13] = matrix[15] = 0.f;
+
+
+ matrix[0] = 2 * zNear / (right - left);
+ matrix[5] = 2 * zNear / (top - bottom);
+ matrix[8] = (right + left) / (right - left);
+ matrix[9] = (top + bottom) / (top - bottom);
+ matrix[10] = -(zFar + zNear) / (zFar - zNear);
+ matrix[11] = -1.f;
+ matrix[14] = -(2 * zFar * zNear) / (zFar - zNear);
+}
+static inline void Matrix3DSetPerspectiveProjectionWithFieldOfView
+ (Matrix3D matrix, GLfloat fieldOfVision, GLfloat near,
+ GLfloat far, GLfloat aspectRatio)
+{
+ GLfloat size = near * tanf(DEGREES_TO_RADIANS(fieldOfVision) / 2.0);
+ Matrix3DSetFrustumProjection( matrix,
+ -size,
+ size,
+ -size / aspectRatio,
+ size / aspectRatio,
+ near,
+ far);
+}
+typedef struct
+{
+ GLfloat s;
+ GLfloat t;
+} TextureCoord;
View
18 Simple Per-Vertex Directional Lighting/Classes/GLProgram.h
@@ -0,0 +1,18 @@
+#import <Foundation/Foundation.h>
+#import <OpenGLES/ES2/gl.h>
+#import <OpenGLES/ES2/glext.h>
+
+@interface GLProgram : NSObject
+{
+}
+- (id)initWithVertexShaderFilename:(NSString *)vShaderFilename
+ fragmentShaderFilename:(NSString *)fShaderFilename;
+- (void)addAttribute:(NSString *)attributeName;
+- (GLuint)attributeIndex:(NSString *)attributeName;
+- (GLuint)uniformIndex:(NSString *)uniformName;
+- (BOOL)link;
+- (void)use;
+- (NSString *)vertexShaderLog;
+- (NSString *)fragmentShaderLog;
+- (NSString *)programLog;
+@end
View
182 Simple Per-Vertex Directional Lighting/Classes/GLProgram.m
@@ -0,0 +1,182 @@
+#import "GLProgram.h"
+
+#pragma mark Function Pointer Definitions
+typedef void (*GLInfoFunction)(GLuint program,
+ GLenum pname,
+ GLint* params);
+typedef void (*GLLogFunction) (GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLchar* infolog);
+#pragma mark -
+#pragma mark Private Extension Method Declaration
+@interface GLProgram()
+{
+ NSMutableArray *attributes;
+ GLuint program,
+ vertShader,
+ fragShader;
+}
+- (BOOL)compileShader:(GLuint *)shader
+ type:(GLenum)type
+ file:(NSString *)file;
+- (NSString *)logForOpenGLObject:(GLuint)object
+ infoCallback:(GLInfoFunction)infoFunc
+ logFunc:(GLLogFunction)logFunc;
+@end
+#pragma mark -
+
+@implementation GLProgram
+- (id)initWithVertexShaderFilename:(NSString *)vShaderFilename
+ fragmentShaderFilename:(NSString *)fShaderFilename
+{
+ if (self = [super init])
+ {
+ attributes = [[NSMutableArray alloc] init];
+ NSString *vertShaderPathname, *fragShaderPathname;
+ program = glCreateProgram();
+
+ vertShaderPathname = [[NSBundle mainBundle]
+ pathForResource:vShaderFilename
+ ofType:@"vsh"];
+ if (![self compileShader:&vertShader
+ type:GL_VERTEX_SHADER
+ file:vertShaderPathname])
+ NSLog(@"Failed to compile vertex shader");
+
+ fragShaderPathname = [[NSBundle mainBundle]
+ pathForResource:fShaderFilename
+ ofType:@"fsh"];
+ if (![self compileShader:&fragShader
+ type:GL_FRAGMENT_SHADER
+ file:fragShaderPathname])
+ NSLog(@"Failed to compile fragment shader");
+
+ glAttachShader(program, vertShader);
+ glAttachShader(program, fragShader);
+ }
+
+ return self;
+}
+- (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 NO;
+ }
+
+ *shader = glCreateShader(type);
+ glShaderSource(*shader, 1, &source, NULL);
+ glCompileShader(*shader);
+
+ glGetShaderiv(*shader, GL_COMPILE_STATUS, &status);
+ return status == GL_TRUE;
+}
+#pragma mark -
+- (void)addAttribute:(NSString *)attributeName
+{
+ if (![attributes containsObject:attributeName])
+ {
+ [attributes addObject:attributeName];
+ glBindAttribLocation(program,
+ [attributes indexOfObject:attributeName],
+ [attributeName UTF8String]);
+ }
+}
+- (GLuint)attributeIndex:(NSString *)attributeName
+{
+ return [attributes indexOfObject:attributeName];
+}
+- (GLuint)uniformIndex:(NSString *)uniformName
+{
+ return glGetUniformLocation(program, [uniformName UTF8String]);
+}
+#pragma mark -
+- (BOOL)link
+{
+ GLint status;
+
+ glLinkProgram(program);
+ glValidateProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &status);
+ if (status == GL_FALSE)
+ return NO;
+
+ if (vertShader)
+ glDeleteShader(vertShader);
+ if (fragShader)
+ glDeleteShader(fragShader);
+
+ return YES;
+}
+- (void)use
+{
+ glUseProgram(program);
+}
+#pragma mark -
+- (NSString *)logForOpenGLObject:(GLuint)object
+ infoCallback:(GLInfoFunction)infoFunc
+ logFunc:(GLLogFunction)logFunc
+{
+ GLint logLength = 0, charsWritten = 0;
+
+ infoFunc(object, GL_INFO_LOG_LENGTH, &logLength);
+ if (logLength < 1)
+ return nil;
+
+ char *logBytes = malloc(logLength);
+ logFunc(object, logLength, &charsWritten, logBytes);
+ NSString *log = [[[NSString alloc] initWithBytes:logBytes
+ length:logLength
+ encoding:NSUTF8StringEncoding]
+ autorelease];
+ free(logBytes);
+ return log;
+}
+- (NSString *)vertexShaderLog
+{
+ return [self logForOpenGLObject:vertShader
+ infoCallback:(GLInfoFunction)&glGetProgramiv
+ logFunc:(GLLogFunction)&glGetProgramInfoLog];
+
+}
+- (NSString *)fragmentShaderLog
+{
+ return [self logForOpenGLObject:fragShader
+ infoCallback:(GLInfoFunction)&glGetProgramiv
+ logFunc:(GLLogFunction)&glGetProgramInfoLog];
+}
+- (NSString *)programLog
+{
+ return [self logForOpenGLObject:program
+ infoCallback:(GLInfoFunction)&glGetProgramiv
+ logFunc:(GLLogFunction)&glGetProgramInfoLog];
+}
+#pragma mark -
+- (void)dealloc
+{
+ [attributes release];
+
+ if (vertShader)
+ glDeleteShader(vertShader);
+
+ if (fragShader)
+ glDeleteShader(fragShader);
+
+ if (program)
+ glDeleteProgram(program);
+
+ [super dealloc];
+}
+@end
View
22 Simple Per-Vertex Directional Lighting/Classes/GLTexture.h
@@ -0,0 +1,22 @@
+//
+// OpenGLTexture3D.h
+// NeHe Lesson 06
+//
+// Created by Jeff LaMarche on 12/24/08.
+// Copyright 2008 Jeff LaMarche Consulting. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <OpenGLES/EAGL.h>
+#import <OpenGLES/ES1/gl.h>
+#import <OpenGLES/ES1/glext.h>
+
+@interface GLTexture : NSObject {
+ GLuint texture[1];
+ NSString *filename;
+}
+@property (nonatomic, retain) NSString *filename;
+- (id)initWithFilename:(NSString *)filename;
+- (void)use;
++ (void)useDefaultTexture;
+@end
View
81 Simple Per-Vertex Directional Lighting/Classes/GLTexture.m
@@ -0,0 +1,81 @@
+//
+// OpenGLTexture3D.m
+// NeHe Lesson 06
+//
+// Created by Jeff LaMarche on 12/24/08.
+// Copyright 2008 Jeff LaMarche Consulting. All rights reserved.
+//
+
+#import "GLTexture.h"
+
+
+@implementation GLTexture
+@synthesize filename;
+
+- (id)initWithFilename:(NSString *)inFilename
+{
+ if ((self = [super init]))
+ {
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_BLEND);
+
+ self.filename = inFilename;
+ glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
+ glGenTextures(1, &texture[0]);
+ glBindTexture(GL_TEXTURE_2D, texture[0]);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameterf(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
+
+ NSString *extension = [filename pathExtension];
+ NSString *baseFilenameWithExtension = [filename lastPathComponent];
+ NSString *baseFilename = [baseFilenameWithExtension substringToIndex:[baseFilenameWithExtension length] - [extension length] - 1];
+
+ NSString *path = [[NSBundle mainBundle] pathForResource:baseFilename ofType:extension];
+ NSData *texData = [[NSData alloc] initWithContentsOfFile:path];
+
+
+ UIImage *image = [[UIImage alloc] initWithData:texData];
+ if (image == nil)
+ return nil;
+
+ GLuint width = CGImageGetWidth(image.CGImage);
+ GLuint height = CGImageGetHeight(image.CGImage);
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+ void *imageData = malloc( height * width * 4 );
+ CGContextRef context = CGBitmapContextCreate( imageData, width, height, 8, 4 * width, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big );
+ CGContextTranslateCTM (context, 0, height);
+ CGContextScaleCTM (context, 1.0, -1.0);
+ CGColorSpaceRelease( colorSpace );
+ CGContextClearRect( context, CGRectMake( 0, 0, width, height ) );
+ CGContextDrawImage( context, CGRectMake( 0, 0, width, height ), image.CGImage );
+
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, imageData);
+ CGContextRelease(context);
+
+ free(imageData);
+ [image release];
+
+
+ }
+ return self;
+}
++ (void)useDefaultTexture
+{
+ glBindTexture(GL_TEXTURE_2D, 0);
+}
+- (void)use
+{
+ glBindTexture(GL_TEXTURE_2D, texture[0]);
+}
+- (void)dealloc
+{
+ glDeleteTextures(1, &texture[0]);
+ [filename release];
+ [super dealloc];
+}
+@end
View
17 Simple Per-Vertex Directional Lighting/Classes/GLView.h
@@ -0,0 +1,17 @@
+#import <UIKit/UIKit.h>
+#import <QuartzCore/QuartzCore.h>
+#import <OpenGLES/ES2/gl.h>
+#import <OpenGLES/ES2/glext.h>
+#import <QuartzCore/QuartzCore.h>
+
+@class GLViewController;
+
+@interface GLView : UIView
+{
+}
+@property (nonatomic, retain) IBOutlet GLViewController *controller;
+@property (readonly, nonatomic, getter=isAnimating) BOOL animating;
+@property (nonatomic) NSInteger animationFrameInterval;
+- (void)startAnimation;
+- (void)stopAnimation;
+@end
View
189 Simple Per-Vertex Directional Lighting/Classes/GLView.m
@@ -0,0 +1,189 @@
+#import <OpenGLES/ES2/gl.h>
+#import <OpenGLES/ES2/glext.h>
+#import "GLView.h"
+#import "GLViewController.h"
+
+// START:extension
+@interface GLView ()
+{
+ GLint backingWidth;
+ GLint backingHeight;
+ GLuint frameBuffer;
+ GLuint renderBuffer;
+ // START_HIGHLIGHT
+ GLuint depthBuffer;
+ // END_HIGHLIGHT
+}
+// END:extension
+@property (nonatomic, getter=isAnimating) BOOL animating;
+@property (nonatomic, retain) EAGLContext *context;
+@property (nonatomic, retain) CADisplayLink *displayLink;
+- (void)drawView;
+@end
+
+#pragma mark -
+@implementation GLView
+@synthesize controller, animating, context, animationFrameInterval, displayLink;
++ (Class)layerClass
+{
+ return [CAEAGLLayer class];
+}
+
+- (id)initWithCoder:(NSCoder*)coder
+{
+ if (self = [super initWithCoder:coder])
+ {
+ CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
+ eaglLayer.opaque = YES;
+
+ EAGLContext *theContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
+ self.context = theContext;
+ [theContext release];
+
+ if (!self.context || ![EAGLContext setCurrentContext:self.context])
+ {
+
+ [self release];
+ return nil;
+ }
+ animating = NO;
+ animationFrameInterval = 2;
+ }
+ return self;
+}
+// START:createbuffers
+- (void)createBuffers
+{
+ glGenFramebuffers(1, &frameBuffer);
+ glGenRenderbuffers(1, &renderBuffer);
+ glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer);
+ glBindRenderbuffer(GL_RENDERBUFFER, renderBuffer);
+ [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer *)self.layer];
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderBuffer);
+ glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth);
+ glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &backingHeight);
+
+ // START_HIGHLIGHT
+ glGenRenderbuffers(1, &depthBuffer);
+ glBindRenderbuffer(GL_RENDERBUFFER, depthBuffer);
+ glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, backingWidth, backingHeight);
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthBuffer);
+ // END_HIGHLIGHT
+}
+// END:createbuffers
+// START:destroybuffers
+- (void)destroyBuffers
+{
+ glDeleteFramebuffers(1, &frameBuffer);
+ frameBuffer = 0;
+ glDeleteRenderbuffers(1, &renderBuffer);
+ renderBuffer = 0;
+
+ // START_HIGHLIGHT
+ if(depthBuffer)
+ {
+ glDeleteRenderbuffers(1, &depthBuffer);
+ depthBuffer = 0;
+ }
+ // END_HIGHLIGHT
+}
+// END:destroybuffers
+- (void)drawView
+{
+ glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer);
+
+ [controller draw];
+
+ glBindRenderbuffer(GL_RENDERBUFFER, renderBuffer);
+ [context presentRenderbuffer:GL_RENDERBUFFER];
+
+}
+- (void)layoutSubviews
+{
+ [EAGLContext setCurrentContext:context];
+ [self destroyBuffers];
+ [self createBuffers];
+ [self drawView];
+
+
+ glBindRenderbuffer(GL_RENDERBUFFER, renderBuffer);
+
+ glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth);
+ glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &backingHeight);
+
+ if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
+ NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER));
+ glViewport(0, 0, backingWidth, backingHeight);
+ [controller setup];
+}
+- (NSInteger)animationFrameInterval
+{
+ return animationFrameInterval;
+}
+- (void)setAnimationFrameInterval:(NSInteger)frameInterval
+{
+ if (frameInterval >= 1)
+ {
+ animationFrameInterval = frameInterval;
+ if (animating)
+ {
+ [self stopAnimation];
+ [self startAnimation];
+ }
+ }
+}
+- (void)startAnimation
+{
+ if (!animating)
+ {
+ self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(drawView)];
+ [displayLink setFrameInterval:animationFrameInterval];
+ [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
+
+ animating = YES;
+ }
+}
+- (void)stopAnimation
+{
+ if (animating)
+ {
+ [displayLink invalidate];
+ self.displayLink = nil;
+
+ animating = NO;
+ }
+}
+// START:dealloc
+- (void)dealloc
+{
+ [controller release], controller = nil;
+
+ if (frameBuffer)
+ {
+ glDeleteFramebuffers(1, &frameBuffer);
+ frameBuffer = 0;
+ }
+ if (renderBuffer)
+ {
+ glDeleteRenderbuffers(1, &renderBuffer);
+ renderBuffer = 0;
+ }
+ // START_HIGHLIGHT
+ if (depthBuffer)
+ {
+ glDeleteRenderbuffers(1, &depthBuffer);
+ depthBuffer = 0;
+ }
+ // END_HIGHLIGHT
+
+ if ([EAGLContext currentContext] == self.context)
+ [EAGLContext setCurrentContext:nil];
+ [context release], context = nil;
+
+ [displayLink invalidate];
+ [displayLink release], displayLink = nil;
+
+ [super dealloc];
+}
+// END:dealloc
+@end
View
14 Simple Per-Vertex Directional Lighting/Classes/GLViewController.h
@@ -0,0 +1,14 @@
+#import <UIKit/UIKit.h>
+#import <OpenGLES/ES2/gl.h>
+#import <OpenGLES/ES2/glext.h>
+
+@class GLProgram, GLTexture;
+
+@interface GLViewController : UIViewController
+{
+}
+@property (nonatomic, retain) GLProgram *program;
+@property (nonatomic, retain) GLTexture *texture;
+- (void)draw;
+- (void)setup;
+@end
View
334 Simple Per-Vertex Directional Lighting/Classes/GLViewController.m
@@ -0,0 +1,334 @@
+#import "GLViewController.h"
+#import "GLProgram.h"
+#import "GLView.h"
+#import "GLCommon.h"
+#import "GLTexture.h"
+
+// START:extension
+@interface GLViewController ()
+{
+ GLuint positionAttribute;
+ GLuint textureCoordinateAttribute;
+ GLuint normalsAttribute;
+ GLuint matrixUniform;
+ GLuint textureUniform;
+ GLuint lightDirectionUniform;
+ GLuint lightColorUniform;
+
+
+ Matrix3D rotationMatrix;
+ Matrix3D translationMatrix;
+ Matrix3D modelViewMatrix;
+ Matrix3D projectionMatrix;
+ Matrix3D matrix;
+
+
+}
+@end
+// END:extension
+
+@implementation GLViewController
+@synthesize program, texture;
+// START:setup
+- (void)setup
+{
+ GLProgram *theProgram = [[GLProgram alloc] initWithVertexShaderFilename:@"Shader"
+ fragmentShaderFilename:@"Shader"];
+ self.program = theProgram;
+ [theProgram release];
+
+ [self.program addAttribute:@"position"];
+ [self.program addAttribute:@"textureCoordinate"];
+ [self.program addAttribute:@"normalsAttribute"];
+
+ if (![self.program link])
+ {
+ NSLog(@"Link failed");
+
+ NSString *progLog = [self.program programLog];
+ NSLog(@"Program Log: %@", progLog);
+
+ NSString *fragLog = [self.program fragmentShaderLog];
+ NSLog(@"Frag Log: %@", fragLog);
+
+ NSString *vertLog = [self.program vertexShaderLog];
+ NSLog(@"Vert Log: %@", vertLog);
+
+ [(GLView *)self.view stopAnimation];
+ self.program = nil;
+ }
+
+ positionAttribute = [program attributeIndex:@"position"];
+ textureCoordinateAttribute = [program attributeIndex:@"textureCoordinate"];
+ normalsAttribute = [program attributeIndex:@"normalsAttribute"];
+
+ matrixUniform = [program uniformIndex:@"matrix"];
+ textureUniform = [program uniformIndex:@"texture"];
+ lightDirectionUniform = [program uniformIndex:@"lightDirection"];
+ lightColorUniform = [program uniformIndex:@"lightColor"];
+
+
+ glEnable(GL_DEPTH_TEST);
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_ONE, GL_ZERO);
+
+ GLTexture *theTexture = [[GLTexture alloc] initWithFilename:@"DieTexture.png"];
+ self.texture = theTexture;
+ [theTexture release];
+
+}
+// END:setup
+// START:draw
+- (void)draw
+{
+ static const Vertex3D vertices[] =
+ {
+
+ {-0.276385, -0.850640, -0.447215},
+ {0.000000, 0.000000, -1.000000},
+ {0.723600, -0.525720, -0.447215},
+ {0.723600, -0.525720, -0.447215},
+ {0.000000, 0.000000, -1.000000},
+ {0.723600, 0.525720, -0.447215},
+ {-0.894425, 0.000000, -0.447215},
+ {0.000000, 0.000000, -1.000000},
+ {-0.276385, -0.850640, -0.447215},
+ {-0.276385, 0.850640, -0.447215},
+ {0.000000, 0.000000, -1.000000},
+ {-0.894425, 0.000000, -0.447215},
+ {0.723600, 0.525720, -0.447215},
+ {0.000000, 0.000000, -1.000000},
+ {-0.276385, 0.850640, -0.447215},
+ {0.723600, -0.525720, -0.447215},
+ {0.723600, 0.525720, -0.447215},
+ {0.894425, 0.000000, 0.447215},
+ {-0.276385, -0.850640, -0.447215},
+ {0.723600, -0.525720, -0.447215},
+ {0.276385, -0.850640, 0.447215},
+ {-0.894425, 0.000000, -0.447215},
+ {-0.276385, -0.850640, -0.447215},
+ {-0.723600, -0.525720, 0.447215},
+ {-0.276385, 0.850640, -0.447215},
+ {-0.894425, 0.000000, -0.447215},
+ {-0.723600, 0.525720, 0.447215},
+ {0.723600, 0.525720, -0.447215},
+ {-0.276385, 0.850640, -0.447215},
+ {0.276385, 0.850640, 0.447215},
+ {0.894425, 0.000000, 0.447215},
+ {0.276385, -0.850640, 0.447215},
+ {0.723600, -0.525720, -0.447215},
+ {0.276385, -0.850640, 0.447215},
+ {-0.723600, -0.525720, 0.447215},
+ {-0.276385, -0.850640, -0.447215},
+ {-0.723600, -0.525720, 0.447215},
+ {-0.723600, 0.525720, 0.447215},
+ {-0.894425, 0.000000, -0.447215},
+ {-0.723600, 0.525720, 0.447215},
+ {0.276385, 0.850640, 0.447215},
+ {-0.276385, 0.850640, -0.447215},
+ {0.276385, 0.850640, 0.447215},
+ {0.894425, 0.000000, 0.447215},
+ {0.723600, 0.525720, -0.447215},
+ {0.276385, -0.850640, 0.447215},
+ {0.894425, 0.000000, 0.447215},
+ {0.000000, 0.000000, 1.000000},
+ {-0.723600, -0.525720, 0.447215},
+ {0.276385, -0.850640, 0.447215},
+ {0.000000, 0.000000, 1.000000},
+ {-0.723600, 0.525720, 0.447215},
+ {-0.723600, -0.525720, 0.447215},
+ {0.000000, 0.000000, 1.000000},
+ {0.276385, 0.850640, 0.447215},
+ {-0.723600, 0.525720, 0.447215},
+ {0.000000, 0.000000, 1.000000},
+ {0.894425, 0.000000, 0.447215},
+ {0.276385, 0.850640, 0.447215},
+ {0.000000, 0.000000, 1.000000},
+ };
+ static const TextureCoord textureCoordinates[] =
+ {
+ {0.648752, 0.445995},
+ {0.914415, 0.532311},
+ {0.722181, 0.671980},
+ {0.722181, 0.671980},
+ {0.914415, 0.532311},
+ {0.914415, 0.811645},
+ {0.254949, 0.204901},
+ {0.254949, 0.442518},
+ {0.028963, 0.278329},
+ {0.480936, 0.278329},
+ {0.254949, 0.442518},
+ {0.254949, 0.204901},
+ {0.838115, 0.247091},
+ {0.713611, 0.462739},
+ {0.589108, 0.247091},
+ {0.722181, 0.671980},
+ {0.914415, 0.811645},
+ {0.648752, 0.897968},
+ {0.648752, 0.445995},
+ {0.722181, 0.671980},
+ {0.484562, 0.671981},
+ {0.254949, 0.204901},
+ {0.028963, 0.278329},
+ {0.115283, 0.012663},
+ {0.480936, 0.278329},
+ {0.254949, 0.204901},
+ {0.394615, 0.012663},
+ {0.838115, 0.247091},
+ {0.589108, 0.247091},
+ {0.713609, 0.031441},
+ {0.648752, 0.897968},
+ {0.484562, 0.671981},
+ {0.722181, 0.671980},
+ {0.644386, 0.947134},
+ {0.396380, 0.969437},
+ {0.501069, 0.743502},
+ {0.115283, 0.012663},
+ {0.394615, 0.012663},
+ {0.254949, 0.204901},
+ {0.464602, 0.031442},
+ {0.713609, 0.031441},
+ {0.589108, 0.247091},
+ {0.713609, 0.031441},
+ {0.962618, 0.031441},
+ {0.838115, 0.247091},
+ {0.028963, 0.613069},
+ {0.254949, 0.448877},
+ {0.254949, 0.686495},
+ {0.115283, 0.878730},
+ {0.028963, 0.613069},
+ {0.254949, 0.686495},
+ {0.394615, 0.878730},
+ {0.115283, 0.878730},
+ {0.254949, 0.686495},
+ {0.480935, 0.613069},
+ {0.394615, 0.878730},
+ {0.254949, 0.686495},
+ {0.254949, 0.448877},
+ {0.480935, 0.613069},
+ {0.254949, 0.686495},
+ };
+
+ static const Vector3D normals[] = {
+ {-0.276376, -0.850642, -0.447188},
+ {0.000000, 0.000000, -1.000000},
+ {0.723594, -0.525712, -0.447188},
+ {0.723594, -0.525712, -0.447188},
+ {0.000000, 0.000000, -1.000000},
+ {0.723594, 0.525712, -0.447188},
+ {-0.894406, 0.000000, -0.447188},
+ {0.000000, 0.000000, -1.000000},
+ {-0.276376, -0.850642, -0.447188},
+ {-0.276376, 0.850642, -0.447188},
+ {0.000000, 0.000000, -1.000000},
+ {-0.894406, 0.000000, -0.447188},
+ {0.723594, 0.525712, -0.447188},
+ {0.000000, 0.000000, -1.000000},
+ {-0.276376, 0.850642, -0.447188},
+ {0.723594, -0.525712, -0.447188},
+ {0.723594, 0.525712, -0.447188},
+ {0.894406, 0.000000, 0.447188},
+ {-0.276376, -0.850642, -0.447188},
+ {0.723594, -0.525712, -0.447188},
+ {0.276376, -0.850642, 0.447188},
+ {-0.894406, 0.000000, -0.447188},
+ {-0.276376, -0.850642, -0.447188},
+ {-0.723594, -0.525712, 0.447188},
+ {-0.276376, 0.850642, -0.447188},
+ {-0.894406, 0.000000, -0.447188},
+ {-0.723594, 0.525712, 0.447188},
+ {0.723594, 0.525712, -0.447188},
+ {-0.276376, 0.850642, -0.447188},
+ {0.276376, 0.850642, 0.447188},
+ {0.894406, 0.000000, 0.447188},
+ {0.276376, -0.850642, 0.447188},
+ {0.723594, -0.525712, -0.447188},
+ {0.276376, -0.850642, 0.447188},
+ {-0.723594, -0.525712, 0.447188},
+ {-0.276376, -0.850642, -0.447188},
+ {-0.723594, -0.525712, 0.447188},
+ {-0.723594, 0.525712, 0.447188},
+ {-0.894406, 0.000000, -0.447188},
+ {-0.723594, 0.525712, 0.447188},
+ {0.276376, 0.850642, 0.447188},
+ {-0.276376, 0.850642, -0.447188},
+ {0.276376, 0.850642, 0.447188},
+ {0.894406, 0.000000, 0.447188},
+ {0.723594, 0.525712, -0.447188},
+ {0.276376, -0.850642, 0.447188},
+ {0.894406, 0.000000, 0.447188},
+ {0.000000, 0.000000, 1.000000},
+ {-0.723594, -0.525712, 0.447188},
+ {0.276376, -0.850642, 0.447188},
+ {0.000000, 0.000000, 1.000000},
+ {-0.723594, 0.525712, 0.447188},
+ {-0.723594, -0.525712, 0.447188},
+ {0.000000, 0.000000, 1.000000},
+ {0.276376, 0.850642, 0.447188},
+ {-0.723594, 0.525712, 0.447188},
+ {0.000000, 0.000000, 1.000000},
+ {0.894406, 0.000000, 0.447188},
+ {0.276376, 0.850642, 0.447188},
+ {0.000000, 0.000000, 1.000000},
+ };
+
+
+ static GLfloat rot = 0.0f;
+
+ glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ [self.program use];
+
+ glVertexAttribPointer(positionAttribute, 3, GL_FLOAT, 0, 0, vertices);
+ glEnableVertexAttribArray(positionAttribute);
+
+ glVertexAttribPointer(textureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates);
+ glEnableVertexAttribArray(textureCoordinateAttribute);
+
+ glVertexAttribPointer(normalsAttribute, 2, GL_FLOAT, 0, 0, normals);
+ glEnableVertexAttribArray(normalsAttribute);
+
+ static const Vector3D rotationVector = {1.f, 1.f, 1.f};
+ Matrix3DSetRotationByDegrees(rotationMatrix, rot, rotationVector);
+ Matrix3DSetTranslation(translationMatrix, 0.f, 0.f, -3.f);
+ Matrix3DMultiply(translationMatrix, rotationMatrix, modelViewMatrix);
+
+ Matrix3DSetPerspectiveProjectionWithFieldOfView(projectionMatrix, 45.f,
+ 0.1f, 100.f,
+ self.view.frame.size.width /
+ self.view.frame.size.height);
+
+
+ Matrix3DMultiply(projectionMatrix, modelViewMatrix, matrix);
+ glUniformMatrix4fv(matrixUniform, 1, FALSE, matrix);
+
+ glActiveTexture (GL_TEXTURE0);
+ [texture use];
+ glUniform1i (textureUniform, 0);
+
+ glUniform4f(lightDirectionUniform, 1.0, 0.75, 0.25, 1.0);
+ glUniform4f(lightColorUniform, 0.8, 0.8, 1.0, 1.0);
+
+
+ glDrawArrays(GL_TRIANGLES, 0, sizeof(vertices) / sizeof(Vertex3D));
+
+
+
+ rot += 2.f;
+ if (rot > 360.f)
+ rot -= 360.f;
+}
+// END:draw
+#pragma mark -
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+}
+- (void)dealloc
+{
+ [program release], program = nil;
+ [super dealloc];
+}
+@end
View
20 Simple Per-Vertex Directional Lighting/Classes/Hello_GLAppDelegate.h
@@ -0,0 +1,20 @@
+//
+// Hello_GLAppDelegate.h
+// Hello GL
+//
+// Created by jeff on 7/1/10.
+// Copyright __MyCompanyName__ 2010. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class GLViewController;
+
+@interface Hello_GLAppDelegate : NSObject <UIApplicationDelegate>
+{
+
+}
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+@property (nonatomic, retain) IBOutlet GLViewController *rootController;
+@end
+
View
27 Simple Per-Vertex Directional Lighting/Classes/Hello_GLAppDelegate.m
@@ -0,0 +1,27 @@
+#import "Hello_GLAppDelegate.h"
+#import "GLViewController.h"
+#import "GLView.h"
+@implementation Hello_GLAppDelegate
+@synthesize window, rootController;
+#pragma mark -
+#pragma mark Application lifecycle
+- (BOOL)application:(UIApplication *)application
+didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ [window addSubview:rootController.view];
+ rootController.view.frame = window.frame;
+ rootController.view.contentScaleFactor = window.contentScaleFactor;
+ [window makeKeyAndVisible];
+ [(GLView *)rootController.view startAnimation];
+
+ return YES;
+}
+- (void)dealloc
+{
+ [window release], window = nil;
+ [rootController release], rootController = nil;
+ [super dealloc];
+}
+
+
+@end
View
BIN Simple Per-Vertex Directional Lighting/DieTexture.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
30 Simple Per-Vertex Directional Lighting/Hello_GL-Info.plist
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+</dict>
+</plist>
View
9 Simple Per-Vertex Directional Lighting/Hello_GL_Prefix.pch
@@ -0,0 +1,9 @@
+//
+// Prefix header for all source files of the 'Hello GL' target in the 'Hello GL' project
+//
+#define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_3_0
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+ #import <UIKit/UIKit.h>
+#endif
View
BIN Simple Per-Vertex Directional Lighting/IcoTexture.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
379 Simple Per-Vertex Directional Lighting/Icosahedron.xcodeproj/jeff.pbxuser
@@ -0,0 +1,379 @@
+// !$*UTF8*$!
+{
+ 1D3623240D0F684500981E51 /* Hello_GLAppDelegate.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1099, 231}}";
+ sepNavSelRange = "{137, 0}";
+ sepNavVisRange = "{0, 262}";
+ };
+ };
+ 1D3623250D0F684500981E51 /* Hello_GLAppDelegate.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {892, 616}}";
+ sepNavSelRange = "{434, 0}";
+ sepNavVisRange = "{0, 716}";
+ sepNavWindowFrame = "{{107, 36}, {1674, 1053}}";
+ };
+ };
+ 1D6058900D05DD3D006BFB54 /* Icosahedron */ = {
+ activeExec = 0;
+ executables = (
+ 1F56964511E57FB800E745C0 /* Icosahedron */,
+ );
+ };
+ 1F56964511E57FB800E745C0 /* Icosahedron */ = {
+ isa = PBXExecutable;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ breakpointsEnabled = 0;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ dataTipCustomDataFormattersEnabled = 1;
+ dataTipShowTypeColumn = 1;
+ dataTipSortType = 0;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ dylibVariantSuffix = "";
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = Icosahedron;
+ savedGlobals = {
+ };
+ showTypeColumn = 0;
+ sourceDirectories = (
+ );
+ variableFormatDictionary = {
+ };
+ };
+ 1F56965A11E57FCD00E745C0 /* Source Control */ = {
+ isa = PBXSourceControlManager;
+ fallbackIsa = XCSourceControlManager;
+ isSCMEnabled = 0;
+ scmConfiguration = {
+ repositoryNamesForRoots = {
+ "" = "";
+ };
+ };
+ };
+ 1F56965B11E57FCD00E745C0 /* Code sense */ = {
+ isa = PBXCodeSenseManager;
+ indexTemplatePath = "";
+ };
+ 1F75C6D611ED355D00367218 /* GLTexture.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1254, 574}}";
+ sepNavSelRange = "{499, 0}";
+ sepNavVisRange = "{0, 499}";
+ };
+ };
+ 1F75C6D711ED355D00367218 /* GLTexture.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1254, 891}}";
+ sepNavSelRange = "{972, 0}";
+ sepNavVisRange = "{531, 2172}";
+ };
+ };
+ 1F8B5B1F11EBC55E0007D955 /* GLProgram.m:11 */ = {
+ isa = PBXFileBreakpoint;
+ actions = (
+ );
+ breakpointStyle = 0;
+ continueAfterActions = 0;
+ countType = 0;
+ delayBeforeContinue = 0;
+ fileReference = 1F8EF28F11DD2520001816D2 /* GLProgram.m */;
+ functionName = "-initWithVertexShaderFilename:fragmentShaderFilename:";
+ hitCount = 0;
+ ignoreCount = 0;
+ lineNumber = 11;
+ location = "Hello GL";
+ modificationTime = 300666027.350446;
+ originalNumberOfMultipleMatches = 1;
+ state = 0;
+ };
+ 1F8EF28F11DD2520001816D2 /* GLProgram.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1099, 1925}}";
+ sepNavSelRange = "{401, 15}";
+ sepNavVisRange = "{65, 521}";
+ };
+ };
+ 1F8EF29011DD2520001816D2 /* GLProgram.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1099, 209}}";
+ sepNavSelRange = "{529, 0}";
+ sepNavVisRange = "{62, 467}";
+ };
+ };
+ 1F8EF29211DD25C3001816D2 /* GLView.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1099, 198}}";
+ sepNavSelRange = "{462, 0}";
+ sepNavVisRange = "{24, 438}";
+ };
+ };
+ 1F8EF29311DD25C3001816D2 /* GLView.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1099, 2090}}";
+ sepNavSelRange = "{0, 5161}";
+ sepNavVisRange = "{3934, 431}";
+ };
+ };
+ 1F8EF29511DD25CF001816D2 /* GLViewController.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1254, 574}}";
+ sepNavSelRange = "{217, 0}";
+ sepNavVisRange = "{0, 300}";
+ };
+ };
+ 1F8EF29611DD25CF001816D2 /* GLViewController.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1461, 3685}}";
+ sepNavSelRange = "{10818, 0}";
+ sepNavVisRange = "{10531, 435}";
+ sepNavWindowFrame = "{{15, 4}, {1480, 1054}}";
+ };
+ };
+ 1F8EF33911DD2F2A001816D2 /* Shader.fsh */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1461, 167}}";
+ sepNavSelRange = "{184, 0}";
+ sepNavVisRange = "{0, 201}";
+ };
+ };
+ 1F8EF33A11DD2F2A001816D2 /* Shader.vsh */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1254, 574}}";
+ sepNavSelRange = "{105, 53}";
+ sepNavVisRange = "{0, 587}";
+ };
+ };
+ 1FA105B711EAD76400C8F896 /* GLCommon.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1254, 3245}}";
+ sepNavSelRange = "{10006, 0}";
+ sepNavVisRange = "{7886, 2120}";
+ };
+ };
+ 1FEFBA5A126FD1F20058B428 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1FEFBA5B126FD1F20058B428 /* UIView.h */;
+ name = "UIView.h: 250";
+ rLen = 0;
+ rLoc = 13017;
+ rType = 0;
+ vrLen = 1550;
+ vrLoc = 12288;
+ };
+ 1FEFBA5B126FD1F20058B428 /* UIView.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = UIView.h;
+ path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h;
+ sourceTree = "<absolute>";
+ };
+ 1FEFBA5C126FD1F20058B428 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1FEFBA5D126FD1F20058B428 /* CGPDFContext.h */;
+ name = "CGPDFContext.h: 60";
+ rLen = 0;
+ rLoc = 2481;
+ rType = 0;
+ vrLen = 1019;
+ vrLoc = 1957;
+ };
+ 1FEFBA5D126FD1F20058B428 /* CGPDFContext.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = CGPDFContext.h;
+ path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h;
+ sourceTree = "<absolute>";
+ };
+ 1FEFBAAD126FD4870058B428 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 32CA4F630368D1EE00C91783 /* Hello_GL_Prefix.pch */;
+ name = "Hello_GL_Prefix.pch: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 240;
+ vrLoc = 0;
+ };
+ 1FEFBB3E126FDE7D0058B428 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1F8EF29511DD25CF001816D2 /* GLViewController.h */;
+ name = "GLViewController.h: 11";
+ rLen = 0;
+ rLoc = 217;
+ rType = 0;
+ vrLen = 300;
+ vrLoc = 0;
+ };
+ 1FEFBB3F126FDE7D0058B428 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1FA105B711EAD76400C8F896 /* GLCommon.h */;
+ name = "GLCommon.h: 302";
+ rLen = 0;
+ rLoc = 10006;
+ rType = 0;
+ vrLen = 2120;
+ vrLoc = 7886;
+ };
+ 1FEFBBA9126FE1720058B428 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1F75C6D611ED355D00367218 /* GLTexture.h */;
+ name = "GLTexture.h: 23";
+ rLen = 0;
+ rLoc = 499;
+ rType = 0;
+ vrLen = 499;
+ vrLoc = 0;
+ };
+ 1FEFBC7D126FE6F00058B428 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1F8EF33911DD2F2A001816D2 /* Shader.fsh */;
+ name = "Shader.fsh: 6";
+ rLen = 0;
+ rLoc = 184;
+ rType = 0;
+ vrLen = 201;
+ vrLoc = 0;
+ };
+ 1FEFBC7E126FE6F00058B428 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1F75C6D711ED355D00367218 /* GLTexture.m */;
+ name = "GLTexture.m: 32";
+ rLen = 0;
+ rLoc = 972;
+ rType = 0;
+ vrLen = 2172;
+ vrLoc = 531;
+ };
+ 1FEFBC97126FEC030058B428 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1F8EF33A11DD2F2A001816D2 /* Shader.vsh */;
+ name = "Shader.vsh: 7";
+ rLen = 53;
+ rLoc = 105;
+ rType = 0;
+ vrLen = 587;
+ vrLoc = 0;
+ };
+ 1FEFBC9E126FEC250058B428 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1F8EF29611DD25CF001816D2 /* GLViewController.m */;
+ name = "GLViewController.m: 311";
+ rLen = 0;
+ rLoc = 10818;
+ rType = 0;
+ vrLen = 435;
+ vrLoc = 10531;
+ };
+ 1FEFBCA1126FEC3F0058B428 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1F8EF29611DD25CF001816D2 /* GLViewController.m */;
+ name = "GLViewController.m: 311";
+ rLen = 0;
+ rLoc = 10818;
+ rType = 0;
+ vrLen = 1817;
+ vrLoc = 9381;
+ };
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ activeBuildConfigurationName = Debug;
+ activeExecutable = 1F56964511E57FB800E745C0 /* Icosahedron */;
+ activeSDKPreference = iphonesimulator4.1;
+ activeTarget = 1D6058900D05DD3D006BFB54 /* Icosahedron */;
+ addToTargets = (
+ 1D6058900D05DD3D006BFB54 /* Icosahedron */,
+ );
+ breakpoints = (
+ 1F8B5B1F11EBC55E0007D955 /* GLProgram.m:11 */,
+ );
+ codeSenseManager = 1F56965B11E57FCD00E745C0 /* Code sense */;
+ executables = (
+ 1F56964511E57FB800E745C0 /* Icosahedron */,
+ );
+ perUserDictionary = {
+ "PBXConfiguration.PBXBreakpointsDataSource.v1:1CA23EDF0692099D00951B8B" = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_BreakpointID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 20,
+ 206,
+ 20,
+ 206,
+ 206,
+ 206,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXBreakpointsDataSource_ActionID,
+ PBXBreakpointsDataSource_TypeID,
+ PBXBreakpointsDataSource_BreakpointID,
+ PBXBreakpointsDataSource_UseID,
+ PBXBreakpointsDataSource_LocationID,
+ PBXBreakpointsDataSource_ConditionID,
+ PBXBreakpointsDataSource_IgnoreCountID,
+ PBXBreakpointsDataSource_ContinueID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 1076,
+ 20,
+ 48,
+ 43,
+ 43,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ PBXFileDataSource_Target_ColumnID,
+ );
+ };
+ PBXPerProjectTemplateStateSaveDate = 309319917;
+ PBXWorkspaceStateSaveDate = 309319917;
+ };
+ perUserProjectItems = {
+ 1FEFBA5A126FD1F20058B428 /* PBXTextBookmark */ = 1FEFBA5A126FD1F20058B428 /* PBXTextBookmark */;
+ 1FEFBA5C126FD1F20058B428 /* PBXTextBookmark */ = 1FEFBA5C126FD1F20058B428 /* PBXTextBookmark */;
+ 1FEFBAAD126FD4870058B428 /* PBXTextBookmark */ = 1FEFBAAD126FD4870058B428 /* PBXTextBookmark */;
+ 1FEFBB3E126FDE7D0058B428 /* PBXTextBookmark */ = 1FEFBB3E126FDE7D0058B428 /* PBXTextBookmark */;
+ 1FEFBB3F126FDE7D0058B428 /* PBXTextBookmark */ = 1FEFBB3F126FDE7D0058B428 /* PBXTextBookmark */;
+ 1FEFBBA9126FE1720058B428 /* PBXTextBookmark */ = 1FEFBBA9126FE1720058B428 /* PBXTextBookmark */;
+ 1FEFBC7D126FE6F00058B428 /* PBXTextBookmark */ = 1FEFBC7D126FE6F00058B428 /* PBXTextBookmark */;
+ 1FEFBC7E126FE6F00058B428 /* PBXTextBookmark */ = 1FEFBC7E126FE6F00058B428 /* PBXTextBookmark */;
+ 1FEFBC97126FEC030058B428 /* PBXTextBookmark */ = 1FEFBC97126FEC030058B428 /* PBXTextBookmark */;
+ 1FEFBC9E126FEC250058B428 /* PBXTextBookmark */ = 1FEFBC9E126FEC250058B428 /* PBXTextBookmark */;
+ 1FEFBCA1126FEC3F0058B428 /* PBXTextBookmark */ = 1FEFBCA1126FEC3F0058B428 /* PBXTextBookmark */;
+ };
+ sourceControlManager = 1F56965A11E57FCD00E745C0 /* Source Control */;
+ userBuildSettings = {
+ };
+ };
+ 32CA4F630368D1EE00C91783 /* Hello_GL_Prefix.pch */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1461, 167}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 240}";
+ };
+ };
+}
View
1,530 Simple Per-Vertex Directional Lighting/Icosahedron.xcodeproj/jeff.perspectivev3
@@ -0,0 +1,1530 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>ActivePerspectiveName</key>
+ <string>Debug</string>
+ <key>AllowedModules</key>
+ <array>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Name</key>
+ <string>Groups and Files Outline View</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Name</key>
+ <string>Editor</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCTaskListModule</string>
+ <key>Name</key>
+ <string>Task List</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Name</key>
+ <string>File and Smart Group Detail Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Name</key>
+ <string>Detailed Build Results Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ <key>Name</key>
+ <string>Project Batch Find Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCProjectFormatConflictsModule</string>
+ <key>Name</key>
+ <string>Project Format Conflicts List</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXBookmarksModule</string>
+ <key>Name</key>
+ <string>Bookmarks Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXClassBrowserModule</string>
+ <key>Name</key>
+ <string>Class Browser</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ <key>Name</key>
+ <string>Source Code Control Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXDebugBreakpointsModule</string>
+ <key>Name</key>
+ <string>Debug Breakpoints Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDockableInspector</string>
+ <key>Name</key>
+ <string>Inspector</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXOpenQuicklyModule</string>
+ <key>Name</key>
+ <string>Open Quickly Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Name</key>
+ <string>Debugger</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Name</key>
+ <string>Debug Console</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCSnapshotModule</string>
+ <key>Name</key>
+ <string>Snapshots Tool</string>
+ </dict>
+ </array>
+ <key>BundlePath</key>
+ <string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
+ <key>Description</key>
+ <string>AIODescriptionKey</string>
+ <key>DockingSystemVisible</key>
+ <false/>
+ <key>Extension</key>
+ <string>perspectivev3</string>
+ <key>FavBarConfig</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1F56965911E57FCD00E745C0</string>
+ <key>XCBarModuleItemNames</key>
+ <dict/>
+ <key>XCBarModuleItems</key>
+ <array/>
+ </dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>com.apple.perspectives.project.defaultV3</string>
+ <key>MajorVersion</key>
+ <integer>34</integer>
+ <key>MinorVersion</key>
+ <integer>0</integer>
+ <key>Name</key>
+ <string>All-In-One</string>
+ <key>Notifications</key>
+ <array>
+ <dict>
+ <key>XCObserverAutoDisconnectKey</key>
+ <true/>
+ <key>XCObserverDefintionKey</key>
+ <dict/>
+ <key>XCObserverFactoryKey</key>
+ <string>XCPerspectivesSpecificationIdentifier</string>
+ <key>XCObserverGUIDKey</key>
+ <string>XCObserverProjectIdentifier</string>
+ <key>XCObserverNotificationKey</key>
+ <string>PBXStatusBuildStateMessageNotification</string>
+ <key>XCObserverTargetKey</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>XCObserverTriggerKey</key>
+ <string>awakenModuleWithObserver:</string>
+ <key>XCObserverValidationKey</key>
+ <dict/>
+ </dict>
+ </array>
+ <key>OpenEditors</key>
+ <array/>
+ <key>PerspectiveWidths</key>
+ <array>
+ <integer>1522</integer>
+ <integer>1522</integer>
+ </array>
+ <key>Perspectives</key>
+ <array>
+ <dict>
+ <key>ChosenToolbarItems</key>
+ <array>
+ <string>XCToolbarPerspectiveControl</string>
+ <string>NSToolbarSeparatorItem</string>
+ <string>active-combo-popup</string>
+ <string>action</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>debugger-enable-breakpoints</string>
+ <string>clean</string>
+ <string>buildOrClean</string>
+ <string>build-and-go</string>
+ <string>com.apple.ide.PBXToolbarStopButton</string>
+ <string>get-info</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>com.apple.pbx.toolbar.searchfield</string>
+ </array>
+ <key>ControllerClassBaseName</key>
+ <string></string>
+ <key>IconName</key>
+ <string>WindowOfProject</string>
+ <key>Identifier</key>
+ <string>perspective.project</string>
+ <key>IsVertical</key>
+ <false/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FAAC04509CD000000102</string>
+ <string>1C37FABC05509CD000000102</string>
+ <string>1C37FABC05539CD112110102</string>
+ <string>E2644B35053B69B200211256</string>
+ <string>1C37FABC04509CD000100104</string>
+ <string>1CC0EA4004350EF90044410B</string>
+ <string>1CC0EA4004350EF90041110B</string>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA23ED40692098700951B8B</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>yes</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>185</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>29B97314FDCFA39411CA2CEA</string>
+ <string>080E96DDFE201D6D7F000001</string>
+ <string>1FB38EF911DD2D5C00047889</string>
+ <string>29B97317FDCFA39411CA2CEA</string>
+ <string>29B97323FDCFA39411CA2CEA</string>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>4</integer>
+ <integer>1</integer>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {185, 909}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <false/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {202, 927}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>185</real>
+ </array>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>202pt</string>
+ </dict>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1F56965211E57FCD00E745C0</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>GLViewController.m</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1F56965311E57FCD00E745C0</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>GLViewController.m</string>
+ <key>_historyCapacity</key>
+ <integer>0</integer>
+ <key>bookmark</key>
+ <string>1FEFBCA1126FEC3F0058B428</string>
+ <key>history</key>
+ <array>
+ <string>1FEFBA5A126FD1F20058B428</string>
+ <string>1FEFBA5C126FD1F20058B428</string>
+ <string>1FEFBAAD126FD4870058B428</string>
+ <string>1FEFBB3E126FDE7D0058B428</string>
+ <string>1FEFBB3F126FDE7D0058B428</string>
+ <string>1FEFBBA9126FE1720058B428</string>
+ <string>1FEFBC7D126FE6F00058B428</string>
+ <string>1FEFBC7E126FE6F00058B428</string>
+ <string>1FEFBC97126FEC030058B428</string>
+ <string>1FEFBC9E126FEC250058B428</string>
+ </array>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ <key>XCSharingToken</key>
+ <string>com.apple.Xcode.CommonNavigatorGroupSharingToken</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {1315, 639}}</string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>639pt</string>
+ </dict>
+ <dict>
+ <key>Proportion</key>
+ <string>283pt</string>
+ <key>Tabs</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA23EDF0692099D00951B8B</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Detail</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{10, 27}, {1315, 256}}</string>
+ </dict>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA23EE00692099D00951B8B</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Project Find</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{10, 31}, {603, 297}}</string>
+ </dict>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXCVSModuleFilterTypeKey</key>
+ <integer>1032</integer>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA23EE10692099D00951B8B</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>SCM Results</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{10, 31}, {603, 297}}</string>
+ </dict>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Build Results</string>
+ <key>XCBuildResultsTrigger_Collapse</key>
+ <integer>1021</integer>
+ <key>XCBuildResultsTrigger_Open</key>
+ <integer>1010</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{10, 27}, {1315, 256}}</string>
+ </dict>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>1315pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXSmartGroupTreeModule</string>
+ <string>XCModuleDock</string>
+ <string>PBXNavigatorGroup</string>
+ <string>XCDockableTabModule</string>
+ <string>XCDetailModule</string>
+ <string>PBXProjectFindModule</string>
+ <string>PBXCVSModule</string>
+ <string>PBXBuildResultsModule</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>1FEFBAC9126FD8FA0058B428</string>
+ <string>1CA23ED40692098700951B8B</string>
+ <string>1FEFBACA126FD8FA0058B428</string>
+ <string>1F56965211E57FCD00E745C0</string>
+ <string>1FEFBACB126FD8FA0058B428</string>
+ <string>1CA23EDF0692099D00951B8B</string>
+ <string>1CA23EE00692099D00951B8B</string>
+ <string>1CA23EE10692099D00951B8B</string>
+ <string>XCMainBuildResultsModuleGUID</string>
+ </array>
+ <key>ToolbarConfigUserDefaultsMinorVersion</key>
+ <string>2</string>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.defaultV3</string>
+ </dict>
+ <dict>
+ <key>ChosenToolbarItems</key>
+ <array>
+ <string>XCToolbarPerspectiveControl</string>
+ <string>NSToolbarSeparatorItem</string>
+ <string>active-combo-popup</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>debugger-enable-breakpoints</string>
+ <string>build-and-go</string>
+ <string>com.apple.ide.PBXToolbarStopButton</string>
+ <string>debugger-restart-executable</string>
+ <string>debugger-pause</string>
+ <string>debugger-step-over</string>
+ <string>debugger-step-into</string>
+ <string>debugger-step-out</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>servicesModulebreakpoints</string>
+ <string>debugger-show-console-window</string>
+ </array>
+ <key>ControllerClassBaseName</key>
+ <string>PBXDebugSessionModule</string>
+ <key>IconName</key>
+ <string>DebugTabIcon</string>
+ <key>Identifier</key>
+ <string>perspective.debug</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CCC7628064C1048000F2A68</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debugger Console</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {1522, 557}}</string>
+ <key>RubberWindowFrame</key>
+ <string>226 70 1522 968 0 0 1920 1058 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Proportion</key>
+ <string>557pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>Debugger</key>
+ <dict>
+ <key>HorizontalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {743, 181}}</string>
+ <string>{{743, 0}, {779, 181}}</string>
+ </array>
+ </dict>
+ <key>VerticalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {1522, 181}}</string>
+ <string>{{0, 181}, {1522, 184}}</string>
+ </array>
+ </dict>
+ </dict>
+ <key>LauncherConfigVersion</key>
+ <string>8</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CCC7629064C1048000F2A68</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debug</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>DebugConsoleVisible</key>
+ <string>None</string>
+ <key>DebugConsoleWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>DebugSTDIOWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>Frame</key>
+ <string>{{0, 562}, {1522, 365}}</string>
+ <key>PBXDebugSessionStackFrameViewKey</key>
+ <dict>
+ <key>DebugVariablesTableConfiguration</key>
+ <array>
+ <string>Name</string>
+ <real>120</real>
+ <string>Value</string>
+ <real>85</real>
+ <string>Summary</string>
+ <real>549</real>
+ </array>
+ <key>Frame</key>
+ <string>{{743, 0}, {779, 181}}</string>
+ <key>RubberWindowFrame</key>
+ <string>226 70 1522 968 0 0 1920 1058 </string>
+ </dict>
+ <key>RubberWindowFrame</key>
+ <string>226 70 1522 968 0 0 1920 1058 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Proportion</key>
+ <string>365pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debug</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXDebugCLIModule</string>
+ <string>PBXDebugSessionModule</string>
+ <string>PBXDebugProcessAndThreadModule</string>
+ <string>PBXDebugProcessViewModule</string>
+ <string>PBXDebugThreadViewModule</string>
+ <string>PBXDebugStackFrameViewModule</string>
+ <string>PBXNavigatorGroup</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>1FEFBACC126FD8FA0058B428</string>
+ <string>1CCC7628064C1048000F2A68</string>
+ <string>1CCC7629064C1048000F2A68</string>
+ <string>1FEFBACD126FD8FA0058B428</string>
+ <string>1FEFBACE126FD8FA0058B428</string>
+ <string>1FEFBACF126FD8FA0058B428</string>
+ <string>1FEFBAD0126FD8FA0058B428</string>
+ <string>1F56965211E57FCD00E745C0</string>
+ </array>
+ <key>ToolbarConfigUserDefaultsMinorVersion</key>
+ <string>2</string>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debugV3</string>
+ </dict>
+ </array>
+ <key>PerspectivesBarVisible</key>
+ <true/>
+ <key>ShelfIsVisible</key>
+ <false/>
+ <key>SourceDescription</key>
+ <string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec'</string>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TimeStamp</key>
+ <real>309324863.64337498</real>
+ <key>ToolbarConfigUserDefaultsMinorVersion</key>
+ <string>2</string>
+ <key>ToolbarDisplayMode</key>
+ <integer>1</integer>
+ <key>ToolbarIsVisible</key>
+ <true/>
+ <key>ToolbarSizeMode</key>
+ <integer>2</integer>
+ <key>Type</key>
+ <string>Perspectives</string>
+ <key>UpdateMessage</key>
+ <string></string>
+ <key>WindowJustification</key>
+ <integer>5</integer>
+ <key>WindowOrderList</key>
+ <array>
+ <string>1F8B5BD511EBC8B00007D955</string>
+ <string>/Users/jeff/Desktop/Simple Per-Vertex Lighting/Icosahedron.xcodeproj</string>
+ </array>
+ <key>WindowString</key>
+ <string>226 70 1522 968 0 0 1920 1058 </string>
+ <key>WindowToolsV3</key>
+ <array>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.debugger</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>Debugger</key>
+ <dict>
+ <key>HorizontalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {317, 164}}</string>
+ <string>{{317, 0}, {377, 164}}</string>
+ </array>
+ </dict>
+ <key>VerticalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {694, 164}}</string>
+ <string>{{0, 164}, {694, 216}}</string>
+ </array>
+ </dict>
+ </dict>
+ <key>LauncherConfigVersion</key>
+ <string>8</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C162984064C10D400B95A72</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debug - GLUTExamples (Underwater)</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>DebugConsoleDrawerSize</key>
+ <string>{100, 120}</string>
+ <key>DebugConsoleVisible</key>
+ <string>None</string>
+ <key>DebugConsoleWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>DebugSTDIOWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>Frame</key>
+ <string>{{0, 0}, {694, 380}}</string>
+ <key>RubberWindowFrame</key>
+ <string>321 238 694 422 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debugger</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXDebugSessionModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <string>1C0AD2AB069F1E9B00FABCE6</string>
+ <string>1C162984064C10D400B95A72</string>
+ <string>1C0AD2AC069F1E9B00FABCE6</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debugV3</string>
+ <key>WindowString</key>
+ <string>321 238 694 422 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <key>WindowToolIsVisible</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.build</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528F0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>&lt;No Editor&gt;</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD052900623707200166675</string>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <integer>1</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {500, 215}}</string>
+ <key>RubberWindowFrame</key>
+ <string>192 257 500 500 0 0 1280 1002 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>218pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Build Results</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 222}, {500, 236}}</string>
+ <key>RubberWindowFrame</key>
+ <string>192 257 500 500 0 0 1280 1002 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Proportion</key>
+ <string>236pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>458pt</string>