Dont forget to pass the profiles to the constructor

This commit is contained in:
rdb 2009-04-03 20:04:19 +00:00
parent a1a06beca0
commit e3e03c9305

View File

@ -1511,7 +1511,7 @@ Shader::
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
PT(Shader) Shader:: PT(Shader) Shader::
load(const string &file, const string &vprofile, const string &fprofile) { load(const string &file, const string &vprofile, const string &fprofile) {
return load(Filename(file)); return load(Filename(file), vprofile, fprofile);
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -1536,7 +1536,7 @@ load(const Filename &file, const string &vprofile, const string &fprofile) {
gobj_cat.error() << "Could not read shader file: " << file << "\n"; gobj_cat.error() << "Could not read shader file: " << file << "\n";
return NULL; return NULL;
} }
PT(Shader) result = new Shader(file, body); PT(Shader) result = new Shader(file, body, vprofile, fprofile);
result->_loaded = true; result->_loaded = true;
_load_table[file] = result; _load_table[file] = result;
return result; return result;
@ -1558,7 +1558,7 @@ make(const string &body, const string &vprofile, const string &fprofile) {
if (i != _make_table.end()) { if (i != _make_table.end()) {
return i->second; return i->second;
} }
PT(Shader) result = new Shader("created-shader", body); PT(Shader) result = new Shader("created-shader", body, vprofile, fprofile);
_make_table[body] = result; _make_table[body] = result;
if (dump_generated_shaders) { if (dump_generated_shaders) {
ostringstream fns; ostringstream fns;