Created
August 1, 2011 11:25
-
-
Save beelsebob/1117968 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [NSTask launchedTaskWithLaunchPath:@"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool" | |
| arguments:[NSArray arrayWithObjects: | |
| @"-e", | |
| @"PVRTC", | |
| @"--channel-weighting-perceptual", | |
| compressionLevel, | |
| @"-f", | |
| @"PVR", | |
| @"-o", | |
| compressedTexturePath, | |
| @"-p", | |
| compressedTexturePreviewPath, | |
| uncompressedImagePath, | |
| nil] | |
| completionHandler:^(int termStatus) | |
| { | |
| NSLog(@"Zomg it got called"); | |
| if(0 == termStatus) | |
| { | |
| [self setPreviewImage:[[[NSImage alloc] initWithContentsOfFile:compressedTexturePreviewPath] autorelease]]; | |
| [self setTextureData:[NSData dataWithContentsOfFile:compressedTexturePath]]; | |
| } | |
| else | |
| { | |
| [self setPreviewImage:nil]; | |
| [self setTexture:nil]; | |
| [self setTextureData:nil]; | |
| } | |
| [self setTextureIsCompressed:YES]; | |
| }]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [NSTask launchedTaskWithLaunchPath:@"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool" | |
| arguments:[NSArray arrayWithObjects: | |
| @"-e", | |
| @"PVRTC", | |
| @"--channel-weighting-perceptual", | |
| compressionLevel, | |
| @"-f", | |
| @"PVR", | |
| @"-o", | |
| compressedTexturePath, | |
| @"-p", | |
| compressedTexturePreviewPath, | |
| uncompressedImagePath, | |
| nil] | |
| completionHandler:^(int termStatus) | |
| { | |
| NSLog(@"Zomg it got called"); | |
| [self setPreviewImage:[[[NSImage alloc] initWithContentsOfFile:compressedTexturePreviewPath] autorelease]]; | |
| [self setTextureData:[NSData dataWithContentsOfFile:compressedTexturePath]]; | |
| [self setTextureIsCompressed:YES]; | |
| }]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment