mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
ios support GLES 3 (#1847)
This commit is contained in:
@@ -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] )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user