Fix: T41318

OSL compiler signature changed with 1.5.
This commit is contained in:
Martijn Berger 2014-08-05 11:11:52 +02:00
parent 77b7e1fe9a
commit b9e4929846
Notes: blender-bot 2023-02-14 10:15:23 +01:00
Referenced by issue #41318, OSL broken on Linux kubuntu 14.04
1 changed files with 7 additions and 1 deletions

View File

@ -260,12 +260,18 @@ bool OSLShaderManager::osl_compile(const string& inputfile, const string& output
options.push_back(outputfile);
/* specify standard include path */
options.push_back("-I" + path_get("shader"));
options.push_back("-I");
options.push_back(path_get("shader"));
stdosl_path = path_get("shader/stdosl.h");
/* compile */
OSL::OSLCompiler *compiler = OSL::OSLCompiler::create();
#if OSL_LIBRARY_VERSION_CODE >= 10500
bool ok = compiler->compile(string_view(inputfile), options, string_view(stdosl_path));
#else
bool ok = compiler->compile(inputfile, options, stdosl_path);
#endif
delete compiler;
return ok;