From 2543137a628b68414254fb2ca747320fd5699ab4 Mon Sep 17 00:00:00 2001 From: gazer Date: Sun, 31 Jan 2016 19:35:59 +0300 Subject: [PATCH] fix https://github.com/buggins/dlangide/issues/130 --- src/dlangui/graphics/glsupport.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dlangui/graphics/glsupport.d b/src/dlangui/graphics/glsupport.d index c43d596a..957f486a 100644 --- a/src/dlangui/graphics/glsupport.d +++ b/src/dlangui/graphics/glsupport.d @@ -125,8 +125,9 @@ class GLProgram { private char[] glslversionString; private void compatibilityFixes(ref char[] code, GLuint type) { - if (glslversionInt < 150) { + if (glslversionInt < 150) code = replace(code, " texture(", " texture2D("); + if (glslversionInt < 140) { if(type == GL_VERTEX_SHADER) { code = replace(code, "in ", "attribute "); @@ -134,6 +135,8 @@ class GLProgram { } else { code = replace(code, "in ", "varying "); + code = replace(code, "out vec4 outColor;", ""); + code = replace(code, "outColor", "gl_FragColor"); } } }