#include <msp/core/raii.h>
+#include <msp/gl/extensions/ext_gpu_shader4.h>
#include <msp/strings/format.h>
#include <msp/strings/utils.h>
#include "error.h"
else if(i->type==FRAGMENT)
{
program.attach_shader_owned(new FragmentShader(apply<Formatter>(*i)));
- for(map<string, unsigned>::iterator j=i->locations.begin(); j!=i->locations.end(); ++j)
- program.bind_fragment_data(j->second, j->first);
+ if(EXT_gpu_shader4)
+ {
+ for(map<string, unsigned>::iterator j=i->locations.begin(); j!=i->locations.end(); ++j)
+ program.bind_fragment_data(j->second, j->first);
+ }
}
}
}
}
else if(stage->type==FRAGMENT && var.interface=="out")
{
+ if(location!=0)
+ static Require _req(EXT_gpu_shader4);
stage->locations[var.name] = location;
var.layout->qualifiers.erase(i);
}