From: divverent Date: Sat, 19 Mar 2011 15:44:19 +0000 (+0000) Subject: define GLSL version explicitly to work around a problem with ATI/AMD drivers not... X-Git-Tag: xonotic-v0.5.0~402 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9e804e718e4615ff13fdcff3a2bbe2f17b7df5c0;p=xonotic%2Fdarkplaces.git define GLSL version explicitly to work around a problem with ATI/AMD drivers not getting __VERSION__ right (?) From: Maik Merten git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10932 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=86c7d4b8a4162a84b21b4771fb60fcc239348770 --- diff --git a/gl_rmain.c b/gl_rmain.c index 10b87853..19ad74b4 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -989,6 +989,9 @@ static void R_GLSL_CompilePermutation(r_glsl_permutation_t *p, unsigned int mode vertstrings_list[vertstrings_count++] = "#version 130\n"; geomstrings_list[geomstrings_count++] = "#version 130\n"; fragstrings_list[fragstrings_count++] = "#version 130\n"; + vertstrings_list[vertstrings_count++] = "#define GLSL130\n"; + geomstrings_list[geomstrings_count++] = "#define GLSL130\n"; + fragstrings_list[fragstrings_count++] = "#define GLSL130\n"; } // the first pretext is which type of shader to compile as diff --git a/shader_glsl.h b/shader_glsl.h index 0801e6d7..515556ae 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -9,7 +9,7 @@ "#define highp\n" "#endif\n" "\n" -"#if __VERSION__ >= 130\n" +"#ifdef GLSL130\n" "# ifdef VERTEX_SHADER\n" "# define dp_varying out\n" "# define dp_attribute in\n"