16 #ifndef SURGSIM_GRAPHICS_MATERIAL_H 17 #define SURGSIM_GRAPHICS_MATERIAL_H 22 #include "SurgSim/Framework/Component.h" 54 virtual void addUniform(std::shared_ptr<UniformBase> uniform) = 0;
59 virtual void addUniform(
const std::string& type,
const std::string& name) = 0;
64 virtual bool removeUniform(std::shared_ptr<UniformBase> uniform) = 0;
74 virtual std::shared_ptr<UniformBase>
getUniform(
const std::string& name)
const = 0;
79 virtual std::shared_ptr<UniformBase>
getUniform(
size_t index)
const = 0;
84 virtual bool hasUniform(
const std::string& name)
const = 0;
89 virtual void loadProgram(
const std::string& nameTuple) = 0;
95 virtual bool setProgram(std::shared_ptr<Program> program) = 0;
99 virtual std::shared_ptr<Program>
getProgram()
const = 0;
109 #endif // SURGSIM_GRAPHICS_MATERIAL_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
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.
Component is the main interface class to pass information to the system managers each will decide whe...
Definition: Component.h:42
Base class that defines the interface for graphics materials.
Definition: Material.h:39
virtual std::shared_ptr< Program > getProgram() const =0
Gets the program used by this material.
virtual bool setProgram(std::shared_ptr< Program > program)=0
Sets the program used by this material.
virtual void addUniform(std::shared_ptr< UniformBase > uniform)=0
Adds a uniform to 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 void clearProgram()=0
Removes the shader from the material, falling back to fixed-function pipeline.
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.