Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Management class for vtkShader XML descriptions. More...
#include <mitkIShaderRepository.h>
Classes | |
class | Shader |
class | ShaderProgram |
Public Member Functions | |
virtual | ~IShaderRepository () |
virtual std::list< Shader::Pointer > | GetShaders () const =0 |
virtual Shader::Pointer | GetShader (const std::string &name) const =0 |
Return the named shader. More... | |
virtual ShaderProgram::Pointer | CreateShaderProgram ()=0 |
virtual Shader::Pointer | GetShader (int id) const =0 |
Return the shader identified by the given id. More... | |
virtual void | AddDefaultProperties (mitk::DataNode *node, mitk::BaseRenderer *renderer, bool overwrite) const =0 |
Adds all parsed shader uniforms to property list of the given DataNode; used by mappers. More... | |
virtual void | UpdateShaderProgram (mitk::IShaderRepository::ShaderProgram *shaderProgram, mitk::DataNode *node, mitk::BaseRenderer *renderer) const =0 |
Applies shader and shader specific variables of the specified DataNode to the VTK object by updating the shader variables of its vtkProperty. More... | |
virtual int | LoadShader (std::istream &stream, const std::string &name)=0 |
Loads a shader from a given file. Make sure that this stream is in the XML shader format. More... | |
virtual bool | UnloadShader (int id)=0 |
Unload a previously loaded shader. More... | |
Management class for vtkShader XML descriptions.
Loads XML shader files from std::istream objects and adds default properties for each shader object (shader uniforms) to the specified mitk::DataNode.
Additionally, it provides a utility function for applying properties for shaders in mappers.
Definition at line 45 of file mitkIShaderRepository.h.
|
virtual |
Definition at line 21 of file mitkIShaderRepository.cpp.
|
pure virtual |
Adds all parsed shader uniforms to property list of the given DataNode; used by mappers.
Implemented in mitk::VtkShaderRepository.
Referenced by mitk::FiberBundleMapper2D::SetDefaultProperties(), and mitk::SurfaceVtkMapper3D::SetDefaultPropertiesForVtkProperty().
|
pure virtual |
Implemented in mitk::VtkShaderRepository.
Referenced by mitk::VtkMapper::VtkMapperLocalStorage::VtkMapperLocalStorage().
|
pure virtual |
Return the named shader.
name | The shader name. |
Names might not be unique. Use the shader id to uniquely identify a shader.
Implemented in mitk::VtkShaderRepository.
|
pure virtual |
Return the shader identified by the given id.
id | The shader id. |
Implemented in mitk::VtkShaderRepository.
|
pure virtual |
Implemented in mitk::VtkShaderRepository.
Referenced by mitk::ShaderProperty::AddShaderTypes().
|
pure virtual |
Loads a shader from a given file. Make sure that this stream is in the XML shader format.
Implemented in mitk::VtkShaderRepository.
|
pure virtual |
Unload a previously loaded shader.
id | The unique shader id returned by LoadShader. |
true
if the shader id was found and the shader was successfully unloaded, false
otherwise. Implemented in mitk::VtkShaderRepository.
|
pure virtual |
Applies shader and shader specific variables of the specified DataNode to the VTK object by updating the shader variables of its vtkProperty.
Implemented in mitk::VtkShaderRepository.
Referenced by mitk::VtkMapper::ApplyShaderProperties().