'es' is required after #version 300.

This commit is contained in:
aliaspider 2017-05-12 01:29:02 +01:00
parent 3cb5b651a2
commit 66c8778878

View File

@ -263,15 +263,19 @@ static bool gl_glsl_compile_shader(glsl_shader_data_t *glsl,
if (existing_version)
{
const char* version_extra = "";
unsigned version_no = strtoul(existing_version + 8, (char**)&program, 10);
#ifdef HAVE_OPENGLES
if (version_no < 130)
version_no = 100;
else
{
version_extra = " es";
version_no = 300;
}
#endif
snprintf(version, sizeof(version), "#version %u\n", version_no);
RARCH_LOG("[GLSL]: Using GLSL version %u.\n", version_no);
snprintf(version, sizeof(version), "#version %u%s\n", version_no, version_extra);
RARCH_LOG("[GLSL]: Using GLSL version %u%s.\n", version_no, version_extra);
}
else if (glsl_core)
{