{
string source;
+ bool legacy_qualifiers = features.legacy || (get_gl_api()==OPENGL_ES2 && !(get_glsl_version()>=Version(3, 0)));
bool use_blocks = !features.legacy && ARB_uniform_buffer_object;
if(!features.legacy)
if(interface&INPUT)
{
- const char *qualifier = (features.legacy ? scope==VERTEX ? "attribute" : "varying" : "in");
+ const char *qualifier = (legacy_qualifiers ? scope==VERTEX ? "attribute" : "varying" : "in");
source += format("%s %s;\n", qualifier, (*i)->create_declaration(interfaces[scope-1]));
}
if(interface&OUTPUT)
{
- const char *qualifier = (features.legacy ? "varying" : "out");
+ const char *qualifier = (legacy_qualifiers ? "varying" : "out");
source += format("%s %s;\n", qualifier, (*i)->create_declaration(interfaces[scope]));
}
}
normalmap(false),
shadow(false),
reflection(false),
- legacy(!(get_glsl_version()>=Version(1, 30)))
+ legacy(get_gl_api()==OPENGL && !(get_glsl_version()>=Version(1, 30)))
{ }
string ProgramBuilder::StandardFeatures::create_flags() const