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.6.0~163^2~614 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=86c7d4b8a4162a84b21b4771fb60fcc239348770;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 --- diff --git a/gl_rmain.c b/gl_rmain.c index 64143694..a2ab80ea 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"