Workarounds are not always available.
#include <msp/core/raii.h>
#include <msp/strings/lexicalcast.h>
#include "compatibility.h"
+#include "glsl_error.h"
using namespace std;
}
else if(stage->type==Stage::FRAGMENT && var.interface=="out")
{
- if(location!=0)
- check_extension(&Features::ext_gpu_shader4);
+ if(location!=0 && !check_extension(&Features::ext_gpu_shader4))
+ throw unsupported_shader("EXT_gpu_shader4 is required");
stage->locations[var.name] = location;
var.layout->qualifiers.erase(i);
}
virtual ~parse_error() throw() { }
};
+class unsupported_shader: public std::runtime_error
+{
+public:
+ unsupported_shader(const std::string &w): runtime_error(w) { }
+ virtual ~unsupported_shader() throw() { }
+};
+
} // namespace SL
} // namespace GL
} // namespace Msp