17 #ifndef _MITKVTKSHADERREPOSITORY_H_
18 #define _MITKVTKSHADERREPOSITORY_H_
21 #include <vtkShaderProgram2.h>
24 class vtkXMLDataElement;
78 float defaultFloat[4];
80 void LoadFromXML(vtkXMLDataElement *e);
109 std::string m_VertexShaderCode;
110 std::string m_FragmentShaderCode;
111 std::string m_GeometryShaderCode;
113 void LoadXmlShader(std::istream &stream);
121 std::list<Shader::Pointer> shaders;
124 static const bool debug;
139 std::list<IShaderRepository::Shader::Pointer>
GetShaders()
const override;
154 int LoadShader(std::istream &stream,
const std::string &name)
override;
void AddDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer, bool overwrite) const override
Adds all parsed shader uniforms to property list of the given DataNode; used by mappers.
IShaderRepository::Shader::Pointer GetShader(const std::string &name) const override
Return the named shader.
itk::SmartPointer< Self > Pointer
void SetVertexShaderCode(const std::string &code)
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
void UpdateShaderProgram(mitk::IShaderRepository::ShaderProgram *shaderProgram, DataNode *node, BaseRenderer *renderer) const override
Applies shader and shader specific variables of the specified DataNode to the VTK object by updating ...
std::string GetFragmentShaderCode() const
ShaderProgram::Pointer CreateShaderProgram() override
std::list< Uniform::Pointer > uniforms
Shader::Pointer GetShaderImpl(const std::string &name) const
Management class for vtkShader XML descriptions.
Management class for vtkShader XML descriptions.
void SetGeometryShaderCode(const std::string &code)
#define mitkClassMacroItkParent(className, SuperClassName)
std::list< Uniform::Pointer > GetUniforms() const
mitkClassMacro(Shader, IShaderRepository::Shader) static Pointer New()
std::list< IShaderRepository::Shader::Pointer > GetShaders() const override
int LoadShader(std::istream &stream, const std::string &name) override
Applies shader and shader specific variables of the specified DataNode to the VTK object by updating ...
bool UnloadShader(int id) override
Unload a previously loaded shader.
std::string GetVertexShaderCode() const
Class for nodes of the DataTree.
void SetFragmentShaderCode(const std::string &code)
std::string GetGeometryShaderCode() const