#include <msp/gl/extensions/khr_debug.h>
#include <msp/gl/extensions/nv_non_square_matrices.h>
#include <msp/io/print.h>
+#include "deviceinfo.h"
#include "error.h"
#include "program.h"
#include "program_backend.h"
void OpenGLProgram::add_glsl_stages(const GlslModule &mod, const map<string, int> &spec_values, TransientData &transient)
{
- SL::Compiler compiler;
+ SL::Compiler compiler(DeviceInfo::get_global().glsl_features);
compiler.set_source(mod.get_prepared_source(), "<module>");
compiler.specialize(spec_values);
compiler.compile(SL::Compiler::PROGRAM);
#include <msp/core/algorithm.h>
#include <msp/io/print.h>
+#include "deviceinfo.h"
#include "module.h"
#include "resources.h"
void Module::set_source(const string &src)
{
- SL::Compiler compiler;
+ SL::Compiler compiler(DeviceInfo::get_global().glsl_features);
compiler.set_source(src);
compile(compiler);
}
void Module::load_source(IO::Base &io, Resources *res, const string &name)
{
- SL::Compiler compiler;
+ SL::Compiler compiler(DeviceInfo::get_global().glsl_features);
compiler.load_source(io, res, name);
compile(compiler);
}
#include "builtin.h"
#include "compiler.h"
#include "debug.h"
-#include "deviceinfo.h"
#include "error.h"
#include "finalize.h"
#include "generate.h"
namespace GL {
namespace SL {
-Compiler::Compiler():
- features(DeviceInfo::get_global().glsl_features)
-{ }
-
Compiler::Compiler(const Features &f):
features(f)
{ }
std::map<std::string, int> spec_values;
public:
- /** Creates a compiler using features from the current OpenGL context. */
- Compiler();
-
/** Creates a compiler targeting a specific set of features. */
Compiler(const Features &);