Skip to content
Snippets Groups Projects
Commit 973e9962 authored by David Parks's avatar David Parks
Browse files

SH-2240 Make OSX never attempt to use GLSL 1.30 or later

parent 84a6a3a9
No related branches found
No related tags found
No related merge requests found
......@@ -566,13 +566,20 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
GLcharARB* text[4096];
GLuint count = 0;
if (gGLManager.mGLVersion < 2.1f)
F32 version = gGLManager.mGLVersion;
//hack to never use GLSL > 1.20 on OSX
#if LL_DARWIN
version = llmin(version, 2.9f);
#endif
if (version < 2.1f)
{
text[count++] = strdup("#version 110\n");
text[count++] = strdup("#define ATTRIBUTE attribute\n");
text[count++] = strdup("#define VARYING varying\n");
}
else if (gGLManager.mGLVersion < 3.f)
else if (version < 3.f)
{
//set version to 1.20
text[count++] = strdup("#version 120\n");
......@@ -583,7 +590,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
}
else
{
if (gGLManager.mGLVersion < 4.f)
if (version < 4.f)
{
//set version to 1.30
text[count++] = strdup("#version 130\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment