One more fix for new OSL libs.
authorThomas Dinges <blender@dingto.org>
Fri, 25 Jul 2014 09:23:15 +0000 (11:23 +0200)
committerThomas Dinges <blender@dingto.org>
Fri, 25 Jul 2014 09:23:15 +0000 (11:23 +0200)
intern/cycles/kernel/osl/osl_services.cpp
intern/cycles/kernel/osl/osl_services.h

index f541333..d5d995d 100644 (file)
@@ -969,7 +969,7 @@ bool OSLRenderServices::environment(ustring filename, TextureOpt &options,
        return status;
 }
 
-bool OSLRenderServices::get_texture_info(ustring filename, int subimage,
+bool OSLRenderServices::get_texture_info(OSL::ShaderGlobals *sg, ustring filename, int subimage,
                                          ustring dataname,
                                          TypeDesc datatype, void *data)
 {
index 2100a33..34c8899 100644 (file)
@@ -106,7 +106,7 @@ public:
                         OSL::ShaderGlobals *sg, const OSL::Vec3 &R,
                         const OSL::Vec3 &dRdx, const OSL::Vec3 &dRdy, float *result);
 
-       bool get_texture_info(ustring filename, int subimage,
+       bool get_texture_info(OSL::ShaderGlobals *sg, ustring filename, int subimage,
                              ustring dataname, TypeDesc datatype, void *data);
 
        static bool get_background_attribute(KernelGlobals *kg, ShaderData *sd, ustring name,
@@ -215,6 +215,12 @@ public:
                          void *renderstate, void *val) {
                return get_userdata(derivatives, name, type, (OSL::ShaderGlobals *) renderstate, val);
        }
+
+       bool get_texture_info(OSL::ShaderGlobals *sg, ustring filename, int subimage,
+                             ustring dataname, TypeDesc datatype, void *data) {
+               return  get_texture_info(NULL, filename, subimage,
+                                                                         dataname, datatype, *data);
+       }
 #endif
 private:
        KernelGlobals *kernel_globals;