From 6c0ca0b16fccd2c8e554e9043ae3fa24dff51c32 Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 17 Sep 2019 15:55:26 +0800 Subject: [PATCH] ios support GLES 3 (#1847) --- native/cocos/platform/ios/CCEAGLView-ios.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/native/cocos/platform/ios/CCEAGLView-ios.mm b/native/cocos/platform/ios/CCEAGLView-ios.mm index c30dfa4636..dd30cf38b6 100644 --- a/native/cocos/platform/ios/CCEAGLView-ios.mm +++ b/native/cocos/platform/ios/CCEAGLView-ios.mm @@ -255,10 +255,11 @@ namespace [NSNumber numberWithBool:_preserveBackbuffer], kEAGLDrawablePropertyRetainedBacking, _pixelformatString, kEAGLDrawablePropertyColorFormat, nil]; + EAGLRenderingAPI renderingAPI = _multisampling ? kEAGLRenderingAPIOpenGLES2 : kEAGLRenderingAPIOpenGLES3; if(! _sharegroup) - _context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; + _context = [[EAGLContext alloc] initWithAPI:renderingAPI]; else - _context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup:_sharegroup]; + _context = [[EAGLContext alloc] initWithAPI:renderingAPI sharegroup:_sharegroup]; if (!_context || ![EAGLContext setCurrentContext:_context] ) {