diff options
author | Dave Parks <davep@lindenlab.com> | 2011-10-21 11:05:49 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-10-21 11:05:49 -0500 |
commit | 973e99622e88714a59056200e74fcbf56bbe6884 (patch) | |
tree | 501375128dd85e9d1047ce4127a09461e3e08e05 | |
parent | 84a6a3a9d69cc6c9a0cccdff01f80c82b8543efa (diff) |
SH-2240 Make OSX never attempt to use GLSL 1.30 or later
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 0a99c66d09..326c938e8e 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -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"); |