GLRenderer: use #version 100 for GLSL ES shaders

This commit is contained in:
Kirill Vainer 2015-08-14 15:25:32 -04:00
parent b8daa13841
commit d32226db10

View File

@ -1066,6 +1066,9 @@ public class GLRenderer implements Renderer {
stringBuf.append("\n"); stringBuf.append("\n");
} else { } else {
if (gles2) { if (gles2) {
// request GLSL ES (1.00) when compiling under GLES2.
stringBuf.append("#version 100\n");
if (source.getType() == ShaderType.Fragment) { if (source.getType() == ShaderType.Fragment) {
// GLES2 requires precision qualifier. // GLES2 requires precision qualifier.
stringBuf.append("precision mediump float;\n"); stringBuf.append("precision mediump float;\n");