gazer 2016-01-31 19:35:59 +03:00
parent c834116053
commit 2543137a62
1 changed files with 4 additions and 1 deletions

View File

@ -125,8 +125,9 @@ class GLProgram {
private char[] glslversionString; private char[] glslversionString;
private void compatibilityFixes(ref char[] code, GLuint type) { private void compatibilityFixes(ref char[] code, GLuint type) {
if (glslversionInt < 150) { if (glslversionInt < 150)
code = replace(code, " texture(", " texture2D("); code = replace(code, " texture(", " texture2D(");
if (glslversionInt < 140) {
if(type == GL_VERTEX_SHADER) if(type == GL_VERTEX_SHADER)
{ {
code = replace(code, "in ", "attribute "); code = replace(code, "in ", "attribute ");
@ -134,6 +135,8 @@ class GLProgram {
} else } else
{ {
code = replace(code, "in ", "varying "); code = replace(code, "in ", "varying ");
code = replace(code, "out vec4 outColor;", "");
code = replace(code, "outColor", "gl_FragColor");
} }
} }
} }