Go to the documentation of this file.
16 #ifndef SURGSIM_GRAPHICS_MATERIAL_H
17 #define SURGSIM_GRAPHICS_MATERIAL_H
54 virtual void addUniform(std::shared_ptr<UniformBase> uniform) = 0;
79 virtual std::shared_ptr<UniformBase>
getUniform(
size_t index)
const = 0;
93 virtual bool setProgram(std::shared_ptr<Program> program) = 0;
107 #endif // SURGSIM_GRAPHICS_MATERIAL_H
Component is the main interface class to pass information to the system managers each will decide whe...
Definition: Component.h:46
virtual void addUniform(std::shared_ptr< UniformBase > uniform)=0
Adds a uniform to this material.
virtual std::shared_ptr< UniformBase > getUniform(size_t index) const =0
Gets a uniform in this material.
virtual size_t getNumUniforms() const =0
Returns the number of uniforms in this material.
virtual std::shared_ptr< UniformBase > getUniform(const std::string &name) const =0
Gets a uniform in this material.
virtual void addUniform(const std::string &type, const std::string &name)=0
Adds a GLSL typed uniform to this material.
Base class that defines the interface for graphics materials.
Definition: Material.h:40
Definition: CompoundShapeToGraphics.cpp:30
virtual bool removeUniform(const std::string &name)=0
Removes a uniform from this material.
virtual std::shared_ptr< Program > getProgram() const =0
Gets the program used by this material.
virtual ~Material()
Destructor.
Definition: Material.h:48
virtual bool removeUniform(std::shared_ptr< UniformBase > uniform)=0
Removes a uniform from this material.
virtual bool setProgram(std::shared_ptr< Program > program)=0
Sets the program used by this material.
Component(const std::string &name)
Constructor.
Definition: Component.cpp:34
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
virtual bool hasUniform(const std::string &name) const =0
Checks if this material has a uniform with the given name.
virtual void clearProgram()=0
Removes the shader from the material, falling back to fixed-function pipeline.
Material(const std::string &name)
Constructor.
Definition: Material.h:44