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;
192 _dataLibraryOSOPath = dirPath;
200 _useTestRender = useTestRender;
206 _useOSLCmdStr = useOslCmdstr;
232 void compileOSL(
const FilePath& oslFilePath);
242 void shadeOSL(
const FilePath& dirPath,
const string& shaderName,
const string& outputName);
249 void renderOSL(
const FilePath& dirPath,
const string& shaderName,
const string& outputName);
254 void renderOSLNetwork(
const FilePath& dirPath,
const string& shaderName);
267 FilePath _oslTestRenderSceneTemplateFile;
268 string _oslShaderName;
270 StringVec _envOslShaderParameterOverrides;
271 string _oslShaderOutputName;
272 string _oslShaderOutputType;
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 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 setDataLibraryOSOPath(const FilePath &dirPath)
void setOslShaderOutput(const string &outputName, const string &outputType)
virtual ImagePtr captureImage(ImagePtr=nullptr)
Capture the current rendered output as an image.
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 useTestRender(bool useTestRender)
void setOSLCmdStr(const string &oslCmd)
Set the osl command string that is to be tested.
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.
#define MATERIALX_NAMESPACE_END
void useOslCommandString(bool useOslCmdstr)
Used to switch between testing oso files and osl command strings.
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.