Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Simple OpenGL ES 2.0 Example/Classes/GLViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ - (void)draw
glVertexAttribPointer(textureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates);
glEnableVertexAttribArray(textureCoordinateAttribute);

static const rotationVector = {1.f, 1.f, 1.f};
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);
Expand Down
15 changes: 14 additions & 1 deletion Simple OpenGL ES 2.0 Example/Classes/Hello_GLAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@ @implementation Hello_GLAppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[window addSubview:rootController.view];
//[window addSubview:rootController.view];
rootController.view.frame = window.frame;
rootController.view.contentScaleFactor = window.contentScaleFactor;
[window makeKeyAndVisible];
[(GLView *)rootController.view startAnimation];

// Set RootViewController to window
if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0)
{
// warning: addSubView doesn't work on iOS6
[window addSubview: rootController.view];
}
else
{
// use this method on ios6
[window setRootViewController:rootController];
}
[window makeKeyAndVisible];

return YES;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Icosahedron" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
Expand Down Expand Up @@ -225,12 +227,15 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Hello_GL_Prefix.pch;
INFOPLIST_FILE = "Hello_GL-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
OTHER_CFLAGS = "";
PRODUCT_NAME = Icosahedron;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -240,10 +245,12 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Hello_GL_Prefix.pch;
INFOPLIST_FILE = "Hello_GL-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = Icosahedron;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand Down