From 1c71b8e32385ab8867b6d65c2e684626f1b3fca7 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 16 Jan 2016 22:46:23 +0500 Subject: [PATCH] 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. --- intern/cycles/render/osl.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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;