From 86c7d4b8a4162a84b21b4771fb60fcc239348770 Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 19 Mar 2011 15:44:19 +0000 Subject: [PATCH] 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 --- gl_rmain.c | 3 +++ shader_glsl.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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" -- 2.39.2