opengl: use desktop header on mac

Fixes #1741
This commit is contained in:
itsmattkc
2021-09-06 11:01:07 -07:00
parent 3fccfecd7e
commit 6d576a3e55
+9 -2
View File
@@ -869,8 +869,15 @@ GLuint OpenGLRenderer::GetCachedTexture(int width, int height, int depth, VideoP
GLuint OpenGLRenderer::CompileShader(GLenum type, const QString &code)
{
static const QString shader_preamble = QStringLiteral("#version 100\n\n"
"precision highp float;\n\n");
static const QString shader_preamble =
#ifndef Q_OS_MAC
// Use appropriate GL ES 2.0 shader header
QStringLiteral("#version 100\n\n"
"precision highp float;\n\n");
#else
// Use desktop GL equivalent header because apparently macOS doesn't support the ES header
QStringLiteral("#version 120\n\n");
#endif
QString complete_code = shader_preamble;