Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-01-16 20:46:23 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-01-16 20:47:04 +0300
commit1c71b8e32385ab8867b6d65c2e684626f1b3fca7 (patch)
treece9d032fdd3c798f77fbecd4cffbe5253655e6c4 /intern/cycles/render/osl.cpp
parent8acf14c55c6c2f2e36748b6e83e84e6d74bb3f35 (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/render/osl.cpp')
-rw-r--r--intern/cycles/render/osl.cpp4
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;