Use GLES3 instead GLES2, when available

master
MoNTE48 2020-04-20 21:33:10 +02:00
parent af49404334
commit 0382792a4d
1 changed files with 8 additions and 1 deletions

View File

@ -150,7 +150,14 @@ bool CEAGLManager::generateContext()
break;
}
dataStorage->Context = [[EAGLContext alloc] initWithAPI:OpenGLESVersion];
if (OpenGLESVersion == kEAGLRenderingAPIOpenGLES2) {
dataStorage->Context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
if (dataStorage->Context == nil)
dataStorage->Context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
} else {
dataStorage->Context = [[EAGLContext alloc] initWithAPI:OpenGLESVersion];
}
if (dataStorage->Context == nil)
{