else
{
unsigned l = line;
- if(stage->required_version<Version(3, 30))
+ if(stage && stage->required_version<Version(3, 30))
--l;
formatted += format("#line %d %d\n", l, index);
}
if(!var.interface.empty() && var.interface!=block_interface)
{
string interface = var.interface;
- if(stage->required_version<Version(1, 30))
+ if(stage && stage->required_version<Version(1, 30))
{
if(stage->type==Stage::VERTEX && var.interface=="in")
interface = "attribute";
Formatter();
const std::string &apply(Stage &);
+ const std::string &apply(Node &n) { n.visit(*this); return formatted; }
private:
void append(const std::string &);