# HG changeset patch # User John Tsiombikas # Date 1315553103 -10800 # Node ID 834503dcb486dca98866d4e5ec399245673124b5 # Parent 23e5d274b2a2c40c524ea5e295efa04123938c77 fixed the rotated gui problem diff -r 23e5d274b2a2 -r 834503dcb486 istereo.xcodeproj/project.pbxproj --- a/istereo.xcodeproj/project.pbxproj Fri Sep 09 10:03:42 2011 +0300 +++ b/istereo.xcodeproj/project.pbxproj Fri Sep 09 10:25:03 2011 +0300 @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ 063C67DA1419CBFF00BA388B /* ui.m in Sources */ = {isa = PBXBuildFile; fileRef = 063C67D81419CBFF00BA388B /* ui.m */; }; 063C67DB1419CBFF00BA388B /* ui.xib in Resources */ = {isa = PBXBuildFile; fileRef = 063C67D91419CBFF00BA388B /* ui.xib */; }; + 069605A71419F55300BD7787 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 069605A61419F55300BD7787 /* CoreGraphics.framework */; }; 069BEBC414188B070043D0BB /* conv.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBBB14188B070043D0BB /* conv.c */; }; 069BEBC514188B070043D0BB /* file_jpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBBC14188B070043D0BB /* file_jpeg.c */; }; 069BEBC614188B070043D0BB /* file_png.c in Sources */ = {isa = PBXBuildFile; fileRef = 069BEBBD14188B070043D0BB /* file_png.c */; }; @@ -134,6 +135,7 @@ 063C67D71419CBFF00BA388B /* ui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ui.h; path = src/ui.h; sourceTree = ""; }; 063C67D81419CBFF00BA388B /* ui.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ui.m; path = src/ui.m; sourceTree = ""; }; 063C67D91419CBFF00BA388B /* ui.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ui.xib; path = src/ui.xib; sourceTree = ""; }; + 069605A61419F55300BD7787 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 069BEBBB14188B070043D0BB /* conv.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = conv.c; path = libs/imago2/conv.c; sourceTree = ""; }; 069BEBBC14188B070043D0BB /* file_jpeg.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = file_jpeg.c; path = libs/imago2/file_jpeg.c; sourceTree = ""; }; 069BEBBD14188B070043D0BB /* file_png.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = file_png.c; path = libs/imago2/file_png.c; sourceTree = ""; }; @@ -314,6 +316,7 @@ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, + 069605A71419F55300BD7787 /* CoreGraphics.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -599,6 +602,7 @@ 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 1D30AB110D05D00D00671497 /* Foundation.framework */, + 069605A61419F55300BD7787 /* CoreGraphics.framework */, ); name = Frameworks; sourceTree = ""; diff -r 23e5d274b2a2 -r 834503dcb486 src/istereo.c --- a/src/istereo.c Fri Sep 09 10:03:42 2011 +0300 +++ b/src/istereo.c Fri Sep 09 10:25:03 2011 +0300 @@ -136,13 +136,12 @@ render(tsec); } else { glViewport(0, 0, view_xsz, view_ysz); - cam_aspect((float)view_ysz / (float)view_xsz); + cam_aspect((float)view_xsz / (float)view_ysz); gl_matrix_mode(GL_PROJECTION); gl_load_identity(); cam_proj_matrix(); - gl_rotatef(-90, 0, 0, 1); - + gl_matrix_mode(GL_MODELVIEW); gl_load_identity(); cam_view_matrix(); diff -r 23e5d274b2a2 -r 834503dcb486 src/ui.m --- a/src/ui.m Fri Sep 09 10:03:42 2011 +0300 +++ b/src/ui.m Fri Sep 09 10:25:03 2011 +0300 @@ -28,6 +28,9 @@ { [super viewDidLoad]; + self.view.center = CGPointMake(160, 240); + self.view.transform = CGAffineTransformMakeRotation(M_PI / 2.0); + [slider_split setValue: 1.0 - split]; sw_stereo.on = stereo ? YES : NO; grp_mode.selectedSegmentIndex = use_bump ? 1 : 0; @@ -35,10 +38,10 @@ // Override to allow orientations other than the default portrait orientation. -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { +/*- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations. return interfaceOrientation == UIInterfaceOrientationLandscapeRight; -} +}*/ - (void)didReceiveMemoryWarning { diff -r 23e5d274b2a2 -r 834503dcb486 src/ui.xib --- a/src/ui.xib Fri Sep 09 10:03:42 2011 +0300 +++ b/src/ui.xib Fri Sep 09 10:25:03 2011 +0300 @@ -153,7 +153,7 @@ 292 - {{350, 136}, {110, 37}} + {{350, 263}, {110, 37}} NO IBCocoaTouchFramework @@ -177,7 +177,7 @@ - {480, 193} + {480, 320} 1 @@ -290,8 +290,8 @@ + - @@ -370,11 +370,11 @@ YES UI UIResponder - {{403, 479}, {480, 193}} + {{403, 352}, {480, 320}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - P4AAAL+AAABDrwAAw4iAAA + P4AAAL+AAABDrwAAwysAAA com.apple.InterfaceBuilder.IBCocoaTouchPlugin