简介
OpenGLES是平台无关的,是用c语言写的。ios12已经被放弃,使用metal库代替
苹果开发者OpenGLES文档链接
- 检查OpenGL ES 3.0扩展
BOOL CheckForExtension(NSString *searchName)
{
// Create a set containing all extension names.
// (For better performance, create the set only once and cache it for future use.)
int max = 0;
glGetIntegerv(GL_NUM_EXTENSIONS, &max);
NSMutableSet *extensions = [NSMutableSet set];
for (int i = 0; i < max; i++) {
[extensions addObject: @( (char *)glGetStringi(GL_EXTENSIONS, i) )];
}
return [extensions containsObject: searchName];
}
网友评论