- detect gl es shaders and request them

This commit is contained in:
Rachael Alexanderson 2017-04-06 23:29:15 -04:00
parent 85a9984807
commit b1e1f25218

View file

@ -216,6 +216,9 @@ FString FShaderProgram::PatchShader(ShaderType type, const FString &code, const
FString patchedCode;
int shaderVersion = MIN((int)round(gl.glslversion * 10) * 10, maxGlslVersion);
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