From dc1695918eb4eff5eb7949e602b20d7b0779f2ea Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Thu, 6 Apr 2017 23:29:15 -0400 Subject: [PATCH] - detect gl es shaders and request them --- src/gl/shaders/gl_shaderprogram.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gl/shaders/gl_shaderprogram.cpp b/src/gl/shaders/gl_shaderprogram.cpp index 5327eeac0..dfb46c544 100644 --- a/src/gl/shaders/gl_shaderprogram.cpp +++ b/src/gl/shaders/gl_shaderprogram.cpp @@ -216,7 +216,10 @@ FString FShaderProgram::PatchShader(ShaderType type, const FString &code, const FString patchedCode; int shaderVersion = MIN((int)round(gl.glslversion * 10) * 10, maxGlslVersion); - patchedCode.AppendFormat("#version %d\n", shaderVersion); + if (gl.es) + patchedCode.AppendFormat("#version %d es\n", shaderVersion); + else + patchedCode.AppendFormat("#version %d\n", shaderVersion); // TODO: Find some way to add extension requirements to the patching //