{
stage = &s;
features = feat;
+ if(!supports_stage(s.type))
+ throw unsupported_shader(format("Stage %s is not supported", Stage::get_stage_name(s.type)));
visit(s.content);
}
return true;
}
+bool LegacyConverter::supports_stage(Stage::Type st) const
+{
+ if(st==Stage::GEOMETRY)
+ {
+ if(features.gl_api==OPENGL_ES2)
+ return check_version(Version(3, 20));
+ else
+ return check_version(Version(1, 50));
+ }
+ else
+ return true;
+}
+
bool LegacyConverter::supports_unified_interface_syntax() const
{
if(features.gl_api==OPENGL_ES2)
virtual void visit(Block &);
bool check_version(const Version &) const;
bool check_extension(bool Features::*) const;
+ bool supports_stage(Stage::Type) const;
bool supports_unified_interface_syntax() const;
virtual void visit(VariableReference &);
virtual void visit(Assignment &);