]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
define GLSL version explicitly to work around a problem with ATI/AMD drivers not...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 19 Mar 2011 15:44:19 +0000 (15:44 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 19 Mar 2011 21:05:11 +0000 (22:05 +0100)
From: Maik Merten <maikmerten@googlemail.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10932 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=86c7d4b8a4162a84b21b4771fb60fcc239348770

gl_rmain.c
shader_glsl.h

index 10b878534ca6930fb672440df1f4bf5d9d8a2d38..19ad74b42186d90d2cbbc6dc24d34adc118bb318 100644 (file)
@@ -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
index 0801e6d711a749c0420e31c42baa732c8c9bb75f..515556aebe6b8e8f73b4222ccf9fdfcc3ab34ee3 100644 (file)
@@ -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"