Workspace 6.21.5
Public Member Functions | List of all members
NullShader Class Reference

#include <Rendering/SceneComponents/Shaders/shader.h>

Inheritance diagram for NullShader:
[legend]

Public Member Functions

bool appliesSpecular () override
 
bool appliesTransparency () const override
 
NullShaderclone () const override
 
ShaderImplementationcreateImplementation (SceneRenderer &) override
 
- Public Member Functions inherited from Shader
 ~Shader () override
 
bool activate (SceneRenderer &renderer)
 Activates the shader on the target WSGLRenderer in preparation for drawing an object.
 
virtual bool appliesScreenSpaceAmbientOcclusion ()
 
virtual bool appliesSpecular ()
 
virtual bool appliesTransparency () const =0
 
Shaderclone () const override=0
 
bool deactivate (SceneRenderer &renderer)
 Deactivates the shader on the target WSGLRenderer, setting it back to the state it was in before the shader was bound.
 
int getId () const
 
Mesh::MeshModelSource::MeshModelInterfaceLockedPtr getMeshModelInterface (const QString &modelId, Mesh::MeshModelLibrary &modelLib)
 
bool getModelSourceUpdateRequested () const
 
bool getOptimizeOutInternalVolumeElements () const
 
double getSegmentLineWidth () const
 
virtual TexturizergetTexturizer ()
 
virtual const TexturizergetTexturizer () const
 
bool renderCurrentModel (SceneRenderer &renderer)
 Renders the model currently being processed by the specified renderer.s.
 
bool renderCurrentModelGlyphs (SceneRenderer &renderer)
 
void setOptimizeOutInternalVolumeElements (bool val)
 
void setSegmentLineWidth (double width)
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()=default
 
virtual Clonableclone () const =0
 

Additional Inherited Members

- Protected Member Functions inherited from Shader
 Shader ()
 
 Shader (const Shader &shader)
 
void addImplementation (const SceneRendererContext &context, ShaderImplementation &impl)
 
void setId (int id)
 

Detailed Description

"Empty" shader that does nothing, used to allow the shader interface to be used by datafactories. It will never be able to be rendered, as is impossible to have an implementation for it.

Member Function Documentation

◆ appliesSpecular()

bool appliesSpecular ( )
inlineoverridevirtual

Sub-classes only need to overide this if they apply specular high-lights (eg. Blinn-Phong).

Reimplemented from Shader.

◆ appliesTransparency()

bool appliesTransparency ( ) const
inlineoverridevirtual

Subclasses must override this to specify whether they apply transparency to objects or not when they are enabled.

Implements Shader.

◆ clone()

NullShader * clone ( ) const
inlineoverridevirtual
Returns
A clone of this object.
Note
Subclasses would normally return their own type rather than the Clonable type. The C++ language rules allow a more derived type to be returned from a virtual function and the compiler will still treat it as a valid override.

Implements Shader.

◆ createImplementation()

ShaderImplementation * createImplementation ( SceneRenderer )
inlineoverridevirtual

Implements Shader.