ios support GLES 3 (#1847)

This commit is contained in:
minggo
2019-09-17 15:55:26 +08:00
committed by GitHub
parent 28df061165
commit 6c0ca0b16f
+3 -2
View File
@@ -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] )
{