4 #ifndef __OSL_SERVICES_H__
5 #define __OSL_SERVICES_H__
15 #include <OSL/oslclosure.h>
16 #include <OSL/oslexec.h>
17 #include <OSL/rendererservices.h>
67 typedef OIIO::unordered_map_concurrent<ustring, OSLTextureHandleRef, ustringHash>
81 OSL::TransformationPtr xform,
85 OSL::TransformationPtr xform,
99 OSL::TransformationPtr xform)
override;
102 OSL::TransformationPtr xform)
override;
128 bool derivatives, ustring name, TypeDesc
type, OSL::ShaderGlobals *sg,
void *val)
override;
137 float *out_distances,
138 int derivs_offset)
override;
146 void *out_data)
override;
152 const ustring *
names,
153 const TypeDesc *
types,
154 const void **
data)
override;
157 OSL::ShaderGlobals *sg,
170 bool derivatives)
override;
172 #if OSL_LIBRARY_VERSION_CODE >= 11100
174 OSL::ShadingContext *
context)
override;
179 bool good(TextureSystem::TextureHandle *texture_handle)
override;
182 TextureSystem::TextureHandle *texture_handle,
183 TexturePerthread *texture_thread_info,
185 OSL::ShaderGlobals *sg,
196 ustring *errormessage)
override;
199 TextureHandle *texture_handle,
200 TexturePerthread *texture_thread_info,
202 OSL::ShaderGlobals *sg,
212 ustring *errormessage)
override;
215 TextureHandle *texture_handle,
216 TexturePerthread *texture_thread_info,
218 OSL::ShaderGlobals *sg,
226 ustring *errormessage)
override;
228 #if OSL_LIBRARY_VERSION_CODE >= 11100
230 TextureHandle *texture_handle,
231 TexturePerthread *texture_thread_info,
232 OSL::ShadingContext *shading_context,
237 ustring *errormessage)
override;
241 TextureHandle *texture_handle,
245 void *
data)
override;
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
void sort(btMatrix3x3 &U, btVector3 &sigma, btMatrix3x3 &V, int t)
Helper function of 3X3 SVD for sorting singular values.
static ustring u_path_transmission_depth
static ustring u_particle_location
bool pointcloud_write(OSL::ShaderGlobals *sg, ustring filename, const OSL::Vec3 &pos, int nattribs, const ustring *names, const TypeDesc *types, const void **data) override
static ustring u_object_alpha
bool get_inverse_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform, float time) override
static ustring u_curve_thickness
static ustring u_particle_index
static ustring u_point_position
static ustring u_point_radius
static bool get_object_standard_attribute(const KernelGlobalsCPU *kg, ShaderData *sd, ustring name, TypeDesc type, bool derivatives, void *val)
static ustring u_curve_tangent_normal
static ustring u_path_diffuse_depth
static ustring u_normal_map_normal
bool get_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform, float time) override
static ustring u_curve_length
static ustring u_material_index
static ustring u_path_ray_depth
static ustring u_point_random
static ustring u_is_smooth
static ustring u_object_location
static ustring u_curve_random
int pointcloud_get(OSL::ShaderGlobals *sg, ustring filename, size_t *indices, int count, ustring attr_name, TypeDesc attr_type, void *out_data) override
static ustring u_particle_rotation
OSL::TextureSystem * texture_system
static ustring u_particle_velocity
static ustring u_particle_angular_velocity
static ustring u_path_glossy_depth
static bool get_background_attribute(const KernelGlobalsCPU *kg, ShaderData *sd, ustring name, TypeDesc type, bool derivatives, void *val)
static ustring u_geom_dupli_uv
static ustring u_geom_undisplaced
OSLTextureHandleMap textures
static ustring u_geom_numpolyvertices
static ustring u_object_random
static ustring u_at_bevel
static ustring u_path_ray_length
bool getmessage(OSL::ShaderGlobals *sg, ustring source, ustring name, TypeDesc type, void *val, bool derivatives) override
bool environment(ustring filename, TextureHandle *texture_handle, TexturePerthread *texture_thread_info, TextureOpt &options, OSL::ShaderGlobals *sg, const OSL::Vec3 &R, const OSL::Vec3 &dRdx, const OSL::Vec3 &dRdy, int nchannels, float *result, float *dresultds, float *dresultdt, ustring *errormessage) override
bool get_attribute(OSL::ShaderGlobals *sg, bool derivatives, ustring object, TypeDesc type, ustring name, void *val) override
static ustring u_particle_random
static ustring u_particle_age
OSLRenderServices(OSL::TextureSystem *texture_system)
bool texture(ustring filename, TextureSystem::TextureHandle *texture_handle, TexturePerthread *texture_thread_info, TextureOpt &options, OSL::ShaderGlobals *sg, float s, float t, float dsdx, float dtdx, float dsdy, float dtdy, int nchannels, float *result, float *dresultds, float *dresultdt, ustring *errormessage) override
bool get_texture_info(OSL::ShaderGlobals *sg, ustring filename, TextureHandle *texture_handle, int subimage, ustring dataname, TypeDesc datatype, void *data) override
static ustring u_object_index
static ustring u_is_point
static ustring u_path_transparent_depth
TextureSystem::TextureHandle * get_texture_handle(ustring filename) override
bool trace(TraceOpt &options, OSL::ShaderGlobals *sg, const OSL::Vec3 &P, const OSL::Vec3 &dPdx, const OSL::Vec3 &dPdy, const OSL::Vec3 &R, const OSL::Vec3 &dRdx, const OSL::Vec3 &dRdy) override
static ustring u_particle_lifetime
bool texture3d(ustring filename, TextureHandle *texture_handle, TexturePerthread *texture_thread_info, TextureOpt &options, OSL::ShaderGlobals *sg, const OSL::Vec3 &P, const OSL::Vec3 &dPdx, const OSL::Vec3 &dPdy, const OSL::Vec3 &dPdz, int nchannels, float *result, float *dresultds, float *dresultdt, float *dresultdr, ustring *errormessage) override
static ustring u_is_curve
static ustring u_object_color
static ustring u_distance
bool get_userdata(bool derivatives, ustring name, TypeDesc type, OSL::ShaderGlobals *sg, void *val) override
static ustring u_geom_trianglevertices
bool get_array_attribute(OSL::ShaderGlobals *sg, bool derivatives, ustring object, TypeDesc type, ustring name, int index, void *val) override
static ustring u_geom_polyvertices
static ustring u_particle_size
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) override
static ustring u_geom_dupli_generated
bool good(TextureSystem::TextureHandle *texture_handle) override
static ustring u_geom_name
#define CCL_NAMESPACE_END
CCL_NAMESPACE_BEGIN struct Options options
ccl_gpu_kernel_postfix int ccl_global int * indices
static const char * dataname(short id_code)
OIIO::unordered_map_concurrent< ustring, OSLTextureHandleRef, ustringHash > OSLTextureHandleMap
OIIO::intrusive_ptr< OSLTextureHandle > OSLTextureHandleRef
OSLTextureHandle(Type type=OIIO, int svm_slot=-1)
ColorSpaceProcessor * processor
OSLTextureHandle(Type type, const vector< int4 > &svm_slots)
OSL::TextureSystem::TextureHandle * oiio_handle