From: divverent Date: Wed, 27 Apr 2011 10:35:15 +0000 (+0000) Subject: do NOT use mediump explicitly for GLSL130 because this seems incompatible with inout X-Git-Tag: xonotic-v0.5.0~247 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4b47726f505d173813f32a6af7e27df88ae27adb;p=xonotic%2Fdarkplaces.git do NOT use mediump explicitly for GLSL130 because this seems incompatible with inout 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 ::stable-branch::merge=f9923b69f7589cf0f373a62b8345a1c8b199859e --- diff --git a/shader_glsl.h b/shader_glsl.h index f5fc5510..c6dfd533 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -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" @@ -44,6 +35,14 @@ "# 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"