OSL: Updates for OSL 1.5 API changes.

* create() and destroy() are deprecated since OSL 1.5, use regular constructors / destructors.
This commit is contained in:
Thomas Dinges 2015-01-28 01:07:59 +01:00
parent 7b16fda379
commit 01cebb6e91
1 changed files with 3 additions and 3 deletions

View File

@ -189,7 +189,7 @@ void OSLShaderManager::shading_system_init()
if(ss_shared_users == 0) {
services_shared = new OSLRenderServices();
ss_shared = OSL::ShadingSystem::create(services_shared, ts_shared, &errhandler);
ss_shared = new OSL::ShadingSystem(services_shared, ts_shared, &errhandler);
ss_shared->attribute("lockgeom", 1);
ss_shared->attribute("commonspace", "world");
ss_shared->attribute("searchpath:shader", path_get("shader"));
@ -238,7 +238,7 @@ void OSLShaderManager::shading_system_free()
ss_shared_users--;
if(ss_shared_users == 0) {
OSL::ShadingSystem::destroy(ss_shared);
delete ss_shared;
ss_shared = NULL;
delete services_shared;
@ -270,7 +270,7 @@ bool OSLShaderManager::osl_compile(const string& inputfile, const string& output
stdosl_path = path_get("shader/stdosl.h");
/* compile */
OSL::OSLCompiler *compiler = OSL::OSLCompiler::create();
OSL::OSLCompiler *compiler = new OSL::OSLCompiler();
bool ok = compiler->compile(string_view(inputfile), options, string_view(stdosl_path));
delete compiler;