On ES when declaring a #version 100 shader, don't append the 'es' suffix

This commit is contained in:
baldurk
2018-02-13 19:34:27 +00:00
parent c9a2d4cca8
commit 528fa085b4
+11 -2
View File
@@ -30,8 +30,17 @@ void GenerateGLSLShader(std::vector<std::string> &sources, ShaderType type,
bool uniforms)
{
sources.resize(4);
sources[0] =
StringFormat::Fmt("#version %d %s\n", version, type == eShaderGLSLES ? "es" : "core");
if(type == eShaderGLSLES)
{
if(version == 100)
sources[0] = "#version 100"; // no es suffix
else
sources[0] = StringFormat::Fmt("#version %d es\n", version);
}
else
{
sources[0] = StringFormat::Fmt("#version %d core\n", version);
}
if(uniforms)
sources[1] = GetEmbeddedResource(glsl_debuguniforms_h);