diff options
author | Rider Linden <rider@lindenlab.com> | 2019-05-09 16:14:51 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2019-05-09 16:14:51 -0700 |
commit | 50779d12f3fe2b7190b9f0e53a01336289b0006a (patch) | |
tree | 42afb25c62ffb57609d96a0d5663bb74450bb780 /indra | |
parent | 61c2f820b4f9753fc73d2e338a38f81ff11de791 (diff) | |
parent | fe734ddf07009734fcf031b7f27f57d813b12b7f (diff) |
Merge
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 27f9e36f0f..6cd9a93ddd 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -705,7 +705,31 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade } else { - if (major_version < 4) + if (major_version >= 4) + { + //set version to 400 + shader_code_text[shader_code_count++] = strdup("#version 400\n"); + } + else if (major_version == 3) + { + if (minor_version < 10) + { + shader_code_text[shader_code_count++] = strdup("#version 300\n"); + } + else if (minor_version <= 19) + { + shader_code_text[shader_code_count++] = strdup("#version 310\n"); + } + else if (minor_version <= 29) + { + shader_code_text[shader_code_count++] = strdup("#version 320\n"); + } + else + { + shader_code_text[shader_code_count++] = strdup("#version 330\n"); + } + } + else { //set version to 1.30 shader_code_text[shader_code_count++] = strdup("#version 130\n"); @@ -713,10 +737,6 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade extra_code_text[extra_code_count++] = strdup("precision mediump int;\n"); extra_code_text[extra_code_count++] = strdup("precision highp float;\n"); } - else - { //set version to 400 - shader_code_text[shader_code_count++] = strdup("#version 400\n"); - } extra_code_text[extra_code_count++] = strdup("#define DEFINE_GL_FRAGCOLOR 1\n"); extra_code_text[extra_code_count++] = strdup("#define FXAA_GLSL_130 1\n"); |