diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-05-29 16:10:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-05-29 21:30:16 +0300 |
commit | a70a435f28abc61f1b2d35c0bbc4d034ffaf4324 (patch) | |
tree | 1c445e4eb5def6f1231ead221bc607c005331c1a /intern/cycles/render/osl.h | |
parent | af073e149b3c734f70bb13f20a4e18682885342e (diff) |
Code refactor: centralize OSL node creation in shader manager.
Diffstat (limited to 'intern/cycles/render/osl.h')
-rw-r--r-- | intern/cycles/render/osl.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h index 110897ff300..13b9d6307f9 100644 --- a/intern/cycles/render/osl.h +++ b/intern/cycles/render/osl.h @@ -22,6 +22,7 @@ #include "util_thread.h" #include "graph.h" +#include "nodes.h" #include "shader.h" #ifdef WITH_OSL @@ -54,6 +55,7 @@ struct OSLShaderInfo { has_surface_bssrdf(false) {} + OSL::OSLQuery query; bool has_surface_emission; bool has_surface_transparent; bool has_surface_bssrdf; @@ -83,6 +85,11 @@ public: const char *shader_load_filepath(string filepath); OSLShaderInfo *shader_loaded_info(const string& hash); + /* create OSL node using OSLQuery */ + OSLNode *osl_node(const std::string& filepath, + const std::string& bytecode_hash = "", + const std::string& bytecode = ""); + protected: void texture_system_init(); void texture_system_free(); |