From c284461b501310b7103bc0bb0728acbe642f9058 Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Mon, 23 Mar 2015 09:50:29 +0300 Subject: [PATCH] fix issue #74 - shaders on Mac --- src/dlangui/graphics/glsupport.d | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dlangui/graphics/glsupport.d b/src/dlangui/graphics/glsupport.d index fccea738..a604d40c 100644 --- a/src/dlangui/graphics/glsupport.d +++ b/src/dlangui/graphics/glsupport.d @@ -85,7 +85,7 @@ class GLProgram { } private void compatibilityFixes(ref char[] code, GLuint type) { - //if (glslversionInt < 150) + if (glslversionInt < 150) code = replace(code, " texture(", " texture2D("); } @@ -356,13 +356,13 @@ class TextureProgram : SolidFillProgram { } @property override string fragmentSource() { return q{ - uniform sampler2D texture; + uniform sampler2D tex; in vec4 col; in vec4 texc; out vec4 outColor; void main(void) { - outColor = texture(texture, texc.st) * col; + outColor = texture(tex, texc.st) * col; } }; } @@ -469,13 +469,13 @@ class FontProgram : SolidFillProgram { } @property override string fragmentSource() { return q{ - uniform sampler2D texture; + uniform sampler2D tex; in vec4 col; in vec4 texc; out vec4 outColor; void main(void) { - outColor = texture(texture, texc.st) * col; + outColor = texture(tex, texc.st) * col; } }; }