11 #ifndef CAFU_MATSYS_SHADER_HPP_INCLUDED
12 #define CAFU_MATSYS_SHADER_HPP_INCLUDED
17 template<
class T>
class ArrayT;
21 class RenderMaterialT;
46 virtual const std::string&
GetName()
const=0;
78 virtual bool NeedsTangentSpace()
const=0;
79 virtual bool NeedsXYAttrib()
const=0;
104 ShaderT* GetStencilShadowVolumesShader();
virtual void Activate()=0
This function activates this shader.
virtual void Deactivate()=0
This function deactivates this shader.
virtual void RenderMesh(const MatSys::MeshT &Mesh)=0
Renders the Mesh, using the renderers currently bound material.
virtual ~ShaderT()
Mark the destructor as being virtual (g++ 4.x raises a warning otherwise).
Definition: Shader.hpp:38
This class represents a surface material ("A datastructural representation of a scripts material def...
Definition: Material.hpp:22
virtual char CanHandleAmbient(const MaterialT &Material) const =0
Returns if and how well this shader can handle the ambient parts of the Material (fully, limited, or not at all).
virtual char CanHandleLighting(const MaterialT &Material) const =0
Returns if and how well this shader can handle the per-lightsource parts of the Material (fully...
virtual const std::string & GetName() const =0
Returns the name of this shader.
This class represents a shader.
Definition: Shader.hpp:28
virtual bool CanHandleStencilShadowVolumes() const =0
Returns if this shader can handle the rendering of stencil shadow volumes.
ShaderT()
The constructor registers this shader at the global shader repository.
Definition: Shader.cpp:53
virtual bool NeedsNormals() const =0
The caller can use these functions in order to learn what attributes and parameters it has to pass-in...
Definition: Renderer.hpp:16
This class represents a polygonal mesh.
Definition: Mesh.hpp:45