Public Member Functions | |
const std::string & | GetName () const |
Returns the name of this shader. More... | |
char | CanHandleAmbient (const MaterialT &) const |
Returns if and how well this shader can handle the ambient parts of the Material (fully, limited, or not at all). More... | |
char | CanHandleLighting (const MaterialT &) const |
Returns if and how well this shader can handle the per-lightsource parts of the Material (fully, limited, or not at all). More... | |
bool | CanHandleStencilShadowVolumes () const |
Returns if this shader can handle the rendering of stencil shadow volumes. More... | |
void | Activate () |
This function activates this shader. More... | |
void | Deactivate () |
This function deactivates this shader. More... | |
bool | NeedsNormals () const |
The caller can use these functions in order to learn what attributes and parameters it has to pass-in with the mesh / mesh vertices for the currently bound / activated Material. More... | |
bool | NeedsTangentSpace () const |
bool | NeedsXYAttrib () const |
void | RenderMesh (const MeshT &Mesh) |
Renders the Mesh, using the renderers currently bound material. More... | |
Additional Inherited Members | |
![]() | |
ShaderT () | |
The constructor registers this shader at the global shader repository. More... | |
virtual | ~ShaderT () |
Mark the destructor as being virtual (g++ 4.x raises a warning otherwise). More... | |
|
inlinevirtual |
This function activates this shader.
Implements ShaderT.
|
inlinevirtual |
Returns if and how well this shader can handle the ambient parts of the Material (fully, limited, or not at all).
Returns 0 if this shader cannot handle the Material at all. Returns 255 if this shader is sure that it can fully handle the Material at maxmimum quality. Returns a number between 1 and 254 if this shader provides limited handling of the Material. The higher the number, the better the provided quality and the less the limitations. The advantage over simple true/false statements is that not every shader needs detail knowledge about every other shader in this renderer.
Implements ShaderT.
|
inlinevirtual |
Returns if and how well this shader can handle the per-lightsource parts of the Material (fully, limited, or not at all).
Returns 0 if this shader cannot handle the Material at all. Returns 255 if this shader is sure that it can fully handle the Material at maxmimum quality. Returns a number between 1 and 254 if this shader provides limited handling of the Material. The higher the number, the better the provided quality and the less the limitations. The advantage over simple true/false statements is that not every shader needs detail knowledge about every other shader in this renderer.
Implements ShaderT.
|
inlinevirtual |
Returns if this shader can handle the rendering of stencil shadow volumes.
There should only be at most one such shader in each renderer.
Implements ShaderT.
|
inlinevirtual |
This function deactivates this shader.
Implements ShaderT.
|
inlinevirtual |
Returns the name of this shader.
IMPLEMENTORS: Shader names must be unique and renderer-independent, e.g. "MyCarPaintMetallicBlue1" (such that Materials that specify a specific Shader are also renderer-independent).
Implements ShaderT.
|
inlinevirtual |
The caller can use these functions in order to learn what attributes and parameters it has to pass-in with the mesh / mesh vertices for the currently bound / activated Material.
Implements ShaderT.
|
inlinevirtual |
Renders the Mesh, using the renderers currently bound material.
Implements ShaderT.