6 #ifndef MATERIALX_OSLRENDERER_H
7 #define MATERIALX_OSLRENDERER_H
105 _oslCompilerExecutable = executableFilePath;
113 _oslIncludePath = dirPath;
120 _oslOutputFilePath = dirPath;
127 _oslShaderParameterOverrides = parameterOverrides;
134 _envOslShaderParameterOverrides = parameterOverrides;
145 _oslShaderOutputName = outputName;
146 _oslShaderOutputType = outputType;
154 _oslTestShadeExecutable = executableFilePath;
162 _oslTestRenderExecutable = executableFilePath;
172 _oslTestRenderSceneTemplateFile = templateFilePath;
180 _oslShaderName = shaderName;
188 _oslUtilityOSOPath = dirPath;
196 _useTestRender = useTestRender;
202 _raysPerPixelLit = rays;
208 _raysPerPixelUnlit = rays;
214 void compileOSL(
const FilePath& oslFilePath);
224 void shadeOSL(
const FilePath& dirPath,
const string& shaderName,
const string& outputName);
231 void renderOSL(
const FilePath& dirPath,
const string& shaderName,
const string& outputName);
244 FilePath _oslTestRenderSceneTemplateFile;
245 string _oslShaderName;
247 StringVec _envOslShaderParameterOverrides;
248 string _oslShaderOutputName;
249 string _oslShaderOutputType;
252 int _raysPerPixelLit;
253 int _raysPerPixelUnlit;
void setShaderParameterOverrides(const StringVec ¶meterOverrides)
void setOslOutputFilePath(const FilePath &dirPath)
void setOslUtilityOSOPath(const FilePath &dirPath)
virtual void validateInputs()
Validate inputs for the program.
#define MATERIALX_NAMESPACE_BEGIN
vector< string > StringVec
A vector of strings.
void * RenderContextHandle
GLenum GLenum GLsizei void * image
void setOslIncludePath(const FileSearchPath &dirPath)
void setOslTestShadeExecutable(const FilePath &executableFilePath)
void setRaysPerPixelLit(int rays)
Set the number of rays per pixel to be used for lit surfaces.
void setOslTestRenderSceneTemplateFile(const FilePath &templateFilePath)
std::shared_ptr< class OslRenderer > OslRendererPtr
StringMap StageMap
A map with name and source code for each shader stage.
void setEnvShaderParameterOverrides(const StringVec ¶meterOverrides)
GLint GLsizei GLsizei height
void setOslShaderOutput(const string &outputName, const string &outputType)
virtual void createProgram(ShaderPtr shader)
Create program based on an input shader.
virtual void setSize(unsigned int width, unsigned int height)
Set the size of the rendered image.
void setRaysPerPixelUnlit(int rays)
Set the number of rays per pixel to be used for unlit surfaces.
void useTestRender(bool useTestRender)
void setOslCompilerExecutable(const FilePath &executableFilePath)
virtual void initialize(RenderContextHandle=nullptr)
Initialize the renderer.
static string OSL_CLOSURE_COLOR_STRING
Color closure OSL string.
void setOslTestRenderExecutable(const FilePath &executableFilePath)
shared_ptr< Shader > ShaderPtr
Shared pointer to a Shader.
virtual ImagePtr captureImage(ImagePtr image=nullptr)
Capture the current rendered output as an image.
#define MATERIALX_NAMESPACE_END
shared_ptr< Image > ImagePtr
A shared pointer to an image.
void setOslShaderName(const string &shaderName)
virtual void render()
Render the current program to produce an image.