16 #ifndef SURGSIM_GRAPHICS_MATERIAL_H 17 #define SURGSIM_GRAPHICS_MATERIAL_H 55 virtual bool addUniform(std::shared_ptr<UniformBase> uniform) = 0;
65 virtual bool removeUniform(std::shared_ptr<UniformBase> uniform) = 0;
80 virtual std::shared_ptr<UniformBase>
getUniform(
size_t index)
const = 0;
94 virtual bool setShader(std::shared_ptr<Shader> shader) = 0;
98 virtual std::shared_ptr<Shader>
getShader()
const = 0;
108 #endif // SURGSIM_GRAPHICS_MATERIAL_H Definition: DriveElementFromInputBehavior.cpp:27
virtual ~Material()
Destructor.
Definition: Material.h:48
Component(const std::string &name)
Constructor.
Definition: Component.cpp:34
virtual size_t getNumUniforms() const =0
Returns the number of uniforms in this material.
virtual std::shared_ptr< Shader > getShader() const =0
Gets the shader used by this material.
Component is the main interface class to pass information to the system managers each will decide whe...
Definition: Component.h:43
string(TOUPPER ${DEVICE}DEVICE_UPPER_CASE) option(BUILD_DEVICE_ $
Definition: CMakeLists.txt:35
Base class that defines the interface for graphics materials.
Definition: Material.h:39
virtual void clearShader()=0
Removes the shader from the material, falling back to fixed-function pipeline.
virtual bool addUniform(std::shared_ptr< UniformBase > uniform)=0
Adds a uniform to this material.
virtual bool setShader(std::shared_ptr< Shader > shader)=0
Sets the shader used by this material.
Material(const std::string &name)
Constructor.
Definition: Material.h:44
virtual bool removeUniform(std::shared_ptr< UniformBase > uniform)=0
Removes a uniform from this material.
virtual std::shared_ptr< UniformBase > getUniform(const std::string &name) const =0
Gets a uniform in this material.
virtual bool hasUniform(const std::string &name) const =0
Checks if this material has a uniform with the given name.