]> 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)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 19 Mar 2011 15:44:19 +0000 (15:44 +0000)
From: Maik Merten <maikmerten@googlemail.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10932 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c
shader_glsl.h

index 6414369443a71e4ecd3578a4b99851e5d66ed1f0..a2ab80ea1b5b58d3bb2e891f0e47c7e1cfe16d2e 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"