diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-15 03:11:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-15 03:11:47 +0400 |
commit | a425790065fedb2ae49f1b79770945d8528790d9 (patch) | |
tree | 052e85489c48215485ca30ea238fb3ef230a63ed /intern/cycles | |
parent | a77d048f66dbc837cabe3dcefe070126647f3c8c (diff) |
style cleanup
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/osl/osl_globals.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/osl/osl_services.cpp | 18 | ||||
-rw-r--r-- | intern/cycles/kernel/osl/osl_services.h | 12 |
3 files changed, 18 insertions, 14 deletions
diff --git a/intern/cycles/kernel/osl/osl_globals.h b/intern/cycles/kernel/osl/osl_globals.h index 075c68824e6..8cbbfc8dbb1 100644 --- a/intern/cycles/kernel/osl/osl_globals.h +++ b/intern/cycles/kernel/osl/osl_globals.h @@ -36,7 +36,7 @@ struct OSLGlobals { /* use */ bool use; - /* shading system */ + /* shading system */ OSL::ShadingSystem *ss; OSLRenderServices *services; diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp index 9d5055112ff..f1deaa9db9d 100644 --- a/intern/cycles/kernel/osl/osl_services.cpp +++ b/intern/cycles/kernel/osl/osl_services.cpp @@ -182,7 +182,8 @@ bool OSLRenderServices::get_array_attribute(void *renderstate, bool derivatives, static void set_attribute_float3(float3 f[3], TypeDesc type, bool derivatives, void *val) { if (type == TypeDesc::TypePoint || type == TypeDesc::TypeVector || - type == TypeDesc::TypeNormal || type == TypeDesc::TypeColor) { + type == TypeDesc::TypeNormal || type == TypeDesc::TypeColor) + { float3 *fval = (float3 *)val; fval[0] = f[0]; if (derivatives) { @@ -203,7 +204,8 @@ static void set_attribute_float3(float3 f[3], TypeDesc type, bool derivatives, v static void set_attribute_float(float f[3], TypeDesc type, bool derivatives, void *val) { if (type == TypeDesc::TypePoint || type == TypeDesc::TypeVector || - type == TypeDesc::TypeNormal || type == TypeDesc::TypeColor) { + type == TypeDesc::TypeNormal || type == TypeDesc::TypeColor) + { float3 *fval = (float3 *)val; fval[0] = make_float3(f[0], f[0], f[0]); if (derivatives) { @@ -232,7 +234,8 @@ static bool get_mesh_attribute(KernelGlobals *kg, const ShaderData *sd, const OS return true; } else if (attr.type == TypeDesc::TypePoint || attr.type == TypeDesc::TypeVector || - attr.type == TypeDesc::TypeNormal || attr.type == TypeDesc::TypeColor) { + attr.type == TypeDesc::TypeNormal || attr.type == TypeDesc::TypeColor) + { /* todo: this won't work when float3 has w component */ float3 fval[3]; fval[0] = triangle_attribute_float3(kg, sd, attr.elem, attr.offset, @@ -419,15 +422,16 @@ bool OSLRenderServices::has_userdata(ustring name, TypeDesc type, void *renderst } int OSLRenderServices::pointcloud_search(OSL::ShaderGlobals *sg, ustring filename, const OSL::Vec3 ¢er, - float radius, int max_points, bool sort, size_t *out_indices, float *out_distances, int derivs_offset) + float radius, int max_points, bool sort, + size_t *out_indices, float *out_distances, int derivs_offset) { - return 0; + return 0; } int OSLRenderServices::pointcloud_get(ustring filename, size_t *indices, int count, - ustring attr_name, TypeDesc attr_type, void *out_data) + ustring attr_name, TypeDesc attr_type, void *out_data) { - return 0; + return 0; } CCL_NAMESPACE_END diff --git a/intern/cycles/kernel/osl/osl_services.h b/intern/cycles/kernel/osl/osl_services.h index 5ec8a8edf9e..790b02a8abc 100644 --- a/intern/cycles/kernel/osl/osl_services.h +++ b/intern/cycles/kernel/osl/osl_services.h @@ -56,22 +56,22 @@ public: bool get_matrix(OSL::Matrix44 &result, OSL::TransformationPtr xform); bool get_matrix(OSL::Matrix44 &result, ustring from); - bool get_array_attribute(void *renderstate, bool derivatives, + bool get_array_attribute(void *renderstate, bool derivatives, ustring object, TypeDesc type, ustring name, int index, void *val); bool get_attribute(void *renderstate, bool derivatives, ustring object, TypeDesc type, ustring name, void *val); - bool get_userdata(bool derivatives, ustring name, TypeDesc type, + bool get_userdata(bool derivatives, ustring name, TypeDesc type, void *renderstate, void *val); bool has_userdata(ustring name, TypeDesc type, void *renderstate); - + int pointcloud_search(OSL::ShaderGlobals *sg, ustring filename, const OSL::Vec3 ¢er, - float radius, int max_points, bool sort, size_t *out_indices, - float *out_distances, int derivs_offset); + float radius, int max_points, bool sort, size_t *out_indices, + float *out_distances, int derivs_offset); int pointcloud_get(ustring filename, size_t *indices, int count, ustring attr_name, - TypeDesc attr_type, void *out_data); + TypeDesc attr_type, void *out_data); private: KernelGlobals *kernel_globals; |