Go to the source code of this file.
|
static BOOL | GetShaderSource (NSString *fileName, NSString *shaderType, NSString *prefix, NSString **outResult) |
|
◆ GetShaderSource()
static BOOL GetShaderSource |
( |
NSString * | fileName, |
|
|
NSString * | shaderType, |
|
|
NSString * | prefix, |
|
|
NSString ** | outResult ) |
|
static |
Definition at line 860 of file OOShaderMaterial.m.
861{
862 NSString *result =
nil;
863 NSArray *extensions =
nil;
864 NSEnumerator *extEnum =
nil;
865 NSString *extension =
nil;
866 NSString *nameWithExtension =
nil;
867
868 if (fileName ==
nil)
return YES;
869
872 {
873 extensions = [NSArray arrayWithObjects:shaderType, [shaderType substringToIndex:4], nil];
874
875
876 if (![fileName pathHasExtensionInArray:extensions])
877 {
878 for (extEnum = [extensions objectEnumerator]; (extension = [extEnum nextObject]); )
879 {
880 nameWithExtension = [fileName stringByAppendingPathExtension:extension];
883 if (result !=
nil)
break;
884 }
885 }
887 {
889 return NO;
890 }
891 }
892
893 if (outResult != NULL) *outResult = result;
894 return YES;
895}
#define OOLog(class, format,...)
NSString *const kOOLogFileNotFound
NSString * stringFromFilesNamed:inFolder:(NSString *fileName,[inFolder] NSString *folderName)
References kOOLogFileNotFound, nil, OOLog, and ResourceManager::stringFromFilesNamed:inFolder:.