6 #ifndef MATERIALX_SHADERRENDERER_H
7 #define MATERIALX_SHADERRENDERER_H
66 _imageHandler = imageHandler;
78 _lightHandler = lightHandler;
90 _geometryHandler = geometryHandler;
96 return _geometryHandler;
108 virtual void createProgram(
const StageMap&
stages);
117 virtual void setSize(
unsigned int width,
unsigned int height);
136 MatrixConvention matrixConvention = MatrixConvention::OpenGL);
166 _errorLog(e._errorLog)
173 _errorLog = e._errorLog;
std::shared_ptr< class Camera > CameraPtr
Shared pointer to a Camera.
ExceptionRenderError & operator=(const ExceptionRenderError &e)
virtual void validateInputs()
Validate inputs for the program.
#define MATERIALX_NAMESPACE_BEGIN
vector< string > StringVec
A vector of strings.
Image::BaseType _baseType
void * RenderContextHandle
GeometryHandlerPtr _geometryHandler
shared_ptr< const Value > ConstValuePtr
A shared pointer to a const Value.
ExceptionRenderError(const ExceptionRenderError &e)
virtual ~ShaderRenderer()
GLenum GLenum GLsizei void * image
std::shared_ptr< class LightHandler > LightHandlerPtr
Shared pointer to a LightHandler.
Exception & operator=(const Exception &e)
StringMap StageMap
A map with name and source code for each shader stage.
GLint GLsizei GLsizei height
GeometryHandlerPtr getGeometryHandler() const
Return the geometry handler.
ExceptionRenderError(const string &msg, const StringVec &errorLog=StringVec())
void setGeometryHandler(GeometryHandlerPtr geometryHandler)
Set the geometry handler.
LightHandlerPtr _lightHandler
const StringVec & errorLog() const
MatrixConvention
Viewing API matrix conventions designation (default to OpenGL).
std::shared_ptr< ImageHandler > ImageHandlerPtr
Shared pointer to an ImageHandler.
ImageHandlerPtr getImageHandler() const
Return the image handler.
void setCamera(CameraPtr camera)
Set the camera.
GLuint const GLchar * name
void setImageHandler(ImageHandlerPtr imageHandler)
Set the image handler used by this renderer for image I/O.
virtual void initialize(RenderContextHandle=nullptr)
Initialize the renderer.
std::shared_ptr< class ShaderRenderer > ShaderRendererPtr
Shared pointer to a shader renderer.
MatrixConvention _matrixConvention
std::shared_ptr< class GeometryHandler > GeometryHandlerPtr
Shared pointer to an GeometryHandler.
LightHandlerPtr getLightHandler() const
Return the light handler.
std::unordered_map< string, string > StringMap
An unordered map with strings as both keys and values.
shared_ptr< Shader > ShaderPtr
Shared pointer to a Shader.
void setLightHandler(LightHandlerPtr lightHandler)
Set the light handler used by this renderer for light bindings.
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.
virtual void render()
Render the current program to produce an image.
CameraPtr getCamera() const
Return the camera.
ImageHandlerPtr _imageHandler