Cycles: Fix compilation with older OSL

We didn't switch to OSL-1.6.9 on all platforms yet,
so please keep codeabse compiled with 1.5 for the
time being.
This commit is contained in:
Sergey Sharybin 2016-01-16 22:46:23 +05:00
parent 8acf14c55c
commit 1c71b8e323
1 changed files with 4 additions and 0 deletions

View File

@ -282,7 +282,11 @@ bool OSLShaderManager::osl_compile(const string& inputfile, const string& output
stdosl_path = path_get("shader/stdosl.h");
/* compile */
#if OSL_LIBRARY_VERSION_CODE >= 10602
OSL::OSLCompiler *compiler = new OSL::OSLCompiler(&OSL::ErrorHandler::default_handler());
#else
OSL::OSLCompiler *compiler = new OSL::OSLCompiler();
#endif
bool ok = compiler->compile(string_view(inputfile), options, string_view(stdosl_path));
delete compiler;