forked from bartvdbraak/blender
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:
parent
7b16fda379
commit
01cebb6e91
@ -189,7 +189,7 @@ void OSLShaderManager::shading_system_init()
|
|||||||
if(ss_shared_users == 0) {
|
if(ss_shared_users == 0) {
|
||||||
services_shared = new OSLRenderServices();
|
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("lockgeom", 1);
|
||||||
ss_shared->attribute("commonspace", "world");
|
ss_shared->attribute("commonspace", "world");
|
||||||
ss_shared->attribute("searchpath:shader", path_get("shader"));
|
ss_shared->attribute("searchpath:shader", path_get("shader"));
|
||||||
@ -238,7 +238,7 @@ void OSLShaderManager::shading_system_free()
|
|||||||
ss_shared_users--;
|
ss_shared_users--;
|
||||||
|
|
||||||
if(ss_shared_users == 0) {
|
if(ss_shared_users == 0) {
|
||||||
OSL::ShadingSystem::destroy(ss_shared);
|
delete ss_shared;
|
||||||
ss_shared = NULL;
|
ss_shared = NULL;
|
||||||
|
|
||||||
delete services_shared;
|
delete services_shared;
|
||||||
@ -270,7 +270,7 @@ bool OSLShaderManager::osl_compile(const string& inputfile, const string& output
|
|||||||
stdosl_path = path_get("shader/stdosl.h");
|
stdosl_path = path_get("shader/stdosl.h");
|
||||||
|
|
||||||
/* compile */
|
/* 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));
|
bool ok = compiler->compile(string_view(inputfile), options, string_view(stdosl_path));
|
||||||
delete compiler;
|
delete compiler;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user