]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
do NOT use mediump explicitly for GLSL130 because this seems incompatible with inout
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Apr 2011 10:35:15 +0000 (10:35 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Apr 2011 10:35:15 +0000 (10:35 +0000)
0(97) : error C7538: OpenGL does not allow 'mediump' after 'inout'

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

shader_glsl.h

index f5fc5510452f876e904b37f09b9925595211babd..c6dfd53303ff159f614a4710444600288f497f8a 100644 (file)
@@ -2,15 +2,6 @@
 "// written by Forest 'LordHavoc' Hale\n"
 "// shadowmapping enhancements by Lee 'eihrul' Salzman\n"
 "\n"
-"// GL ES and GLSL130 shaders use precision modifiers, standard GL does not\n"
-"#ifndef GL_ES\n"
-"#ifndef GLSL130\n"
-"#define lowp\n"
-"#define mediump\n"
-"#define highp\n"
-"#endif\n"
-"#endif\n"
-"\n"
 "#ifdef GLSL130\n"
 "precision mediump float;\n"
 "# ifdef VERTEX_SHADER\n"
 "# define dp_shadow2D(a,b) float(shadow2D(a,b))\n"
 "#endif\n"
 "\n"
+"// GL ES and GLSL130 shaders use precision modifiers, standard GL does not\n"
+"// in GLSL130 we don't use them though because of syntax differences (can't use precision with inout)\n"
+"#ifndef GL_ES\n"
+"#define lowp\n"
+"#define mediump\n"
+"#define highp\n"
+"#endif\n"
+"\n"
 "#ifdef VERTEX_SHADER\n"
 "dp_attribute vec4 Attrib_Position;  // vertex\n"
 "dp_attribute vec4 Attrib_Color;     // color\n"