Workspace 6.21.5
|
Templated base-class for shader implementations that are specific to a particular renderer type and specific to a single shader type. Uses the curiously recurring template pattern to manage the factories associated with the derived implementation class.
#include <Rendering/SceneComponents/Shaders/typedshaderimplementation.h>
Public Types | |
using | renderer_type = R |
typedef S | shader_type |
Public Member Functions | |
TypedShaderImplementation (S &shader) | |
virtual | ~TypedShaderImplementation ()=default |
const ShaderImplementationFactory & | getFactory () const override |
virtual const SceneRendererTypeId & | getSceneRendererType () const |
Public Member Functions inherited from ShaderImplementation | |
virtual | ~ShaderImplementation ()=default |
virtual bool | activate (SceneRenderer &renderer)=0 |
Activates the shader on the target renderer. Subclasses must override this function with an implementation to contains the renderer-specific activation code they need. | |
virtual bool | deactivate (SceneRenderer &renderer)=0 |
Dectivates the shader on the target renderer. Subclasses must override this function with an implementation to contains the renderer-specific activation code they need. | |
virtual const ShaderImplementationFactory & | getFactory () const =0 |
virtual bool | renderCurrentModel (SceneRenderer &renderer)=0 |
Using the target renderer, render the current model. | |
virtual bool | renderCurrentModelGlyphs (SceneRenderer &renderer)=0 |
Using the target renderer, render the current model's glyphs. | |
Static Public Member Functions | |
static void | registerImplementation () |
Protected Member Functions | |
S & | getShader () |
const S & | getShader () const |
Protected Member Functions inherited from ShaderImplementation | |
ShaderImplementation ()=default | |
Static Protected Member Functions | |
static R & | getTypedRenderer (SceneRenderer &renderer) |
using renderer_type = R |
typedef S shader_type |
|
inline |
|
virtualdefault |
|
inlineoverridevirtual |
Implements ShaderImplementation.
|
inlinevirtual |
|
inlineprotected |
|
inlineprotected |
|
inlinestaticprotected |
|
inlinestatic |
Registers the shader implementation type with its parent shader type so that it can be used during rendering if needed.