Created
December 1, 2012 00:57
-
-
Save GlennChiu/4179857 to your computer and use it in GitHub Desktop.
Check for OpenGL ES extensions
This file contains 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
// as recommended by Apple | |
BOOL CheckForExtension(NSString *searchName) | |
{ | |
NSString *extensionsString = [NSString stringWithCString:glGetString(GL_EXTENSIONS) encoding:NSASCIIStringEncoding]; | |
NSArray *extensionsNames = [extensionsString componentsSeparatedByString:@" "]; | |
return [extensionsNames containsObject:searchName]; | |
} | |
// e.g. check for PowerVR Texture Compression format | |
if (CheckForExtension(@"GL_IMG_texture_compression_pvrtc")) | |
{ | |
// continue... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment