diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-16 20:46:23 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-16 20:47:04 +0300 |
commit | 1c71b8e32385ab8867b6d65c2e684626f1b3fca7 (patch) | |
tree | ce9d032fdd3c798f77fbecd4cffbe5253655e6c4 /intern/cycles | |
parent | 8acf14c55c6c2f2e36748b6e83e84e6d74bb3f35 (diff) |
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.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/render/osl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index 75c993c1864..f81fc403ba6 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -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; |