From f9923b69f7589cf0f373a62b8345a1c8b199859e Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 27 Apr 2011 10:35:15 +0000 Subject: [PATCH] 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 --- shader_glsl.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) 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" -- 2.39.2