qt: OpenGL ES 3.0 support

This commit is contained in:
Cacodemon345
2022-03-01 13:31:19 +06:00
parent 7bbb3bc4c6
commit ee69b022fc
5 changed files with 32 additions and 4 deletions

View File

@@ -43,6 +43,7 @@ OpenGLRenderer::OpenGLRenderer(QWidget *parent)
format.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile);
format.setMajorVersion(3);
format.setMinorVersion(0);
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES) format.setRenderableType(QSurfaceFormat::OpenGLES);
setFormat(format);
@@ -389,4 +390,4 @@ OpenGLRenderer::onBlit(int buf_idx, int x, int y, int w, int h)
if (options->renderBehavior() == OpenGLOptions::SyncWithVideo)
render();
}
}