TDME2 1.9.121
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
LightingShaderTreeImplementation Class Reference

Lighting shader implementation. More...

#include <tdme/engine/subsystems/lighting/LightingShaderTreeImplementation.h>

Inheritance diagram for LightingShaderTreeImplementation:
Inheritance graph
Collaboration diagram for LightingShaderTreeImplementation:
Collaboration graph

Public Member Functions

 LightingShaderTreeImplementation (Renderer *renderer)
 Public constructor. More...
 
virtual const string getId () override
 
virtual void initialize () override
 Initialize renderer. More...
 
virtual void registerShader () override
 Register shader. More...
 
virtual void updateShaderParameters (Renderer *renderer, int contextIdx) override
 Update shader parameters. More...
 
- Public Member Functions inherited from LightingShaderBaseImplementation
 LightingShaderBaseImplementation (Renderer *renderer)
 Public constructor. More...
 
virtual bool isInitialized () override
 
virtual void initialize () override
 Initialize renderer. More...
 
virtual void useProgram (Engine *engine, int contextIdx) override
 Use lighting program. More...
 
virtual void unUseProgram (int contextIdx) override
 Unuse lighting program. More...
 
virtual void updateEffect (Renderer *renderer, int contextIdx) override
 Update effect to program. More...
 
virtual void updateMaterial (Renderer *renderer, int contextIdx) override
 Update material to program. More...
 
virtual void updateLight (Renderer *renderer, int contextIdx, int32_t lightId) override
 Update light to program. More...
 
virtual void updateMatrices (Renderer *renderer, int contextIdx) override
 Update matrices to program. More...
 
virtual void updateTextureMatrix (Renderer *renderer, int contextIdx) override
 Update texture matrix to program. More...
 
virtual void bindTexture (Renderer *renderer, int contextIdx, int32_t textureId) override
 Bind texture. More...
 
virtual void updateShaderParameters (Renderer *renderer, int contextIdx) override=0
 Update shader parameters. More...
 
- Public Member Functions inherited from LightingShaderImplementation
virtual ~LightingShaderImplementation ()
 Destructor. More...
 
virtual const string getId ()=0
 
virtual bool isInitialized ()=0
 
virtual void initialize ()=0
 Initialize renderer. More...
 
virtual void registerShader ()=0
 Register shader. More...
 
virtual void useProgram (Engine *engine, int contextIdx)=0
 Use lighting program. More...
 
virtual void unUseProgram (int contextIdx)=0
 Unuse lighting program. More...
 
virtual void updateEffect (Renderer *renderer, int contextIdx)=0
 Update effect to program. More...
 
virtual void updateMaterial (Renderer *renderer, int contextIdx)=0
 Update material to program. More...
 
virtual void updateLight (Renderer *renderer, int contextIdx, int32_t lightId)=0
 Update light to program. More...
 
virtual void updateMatrices (Renderer *renderer, int contextIdx)=0
 Update matrices to program. More...
 
virtual void updateTextureMatrix (Renderer *renderer, int contextIdx)=0
 Update texture matrix to program. More...
 
virtual void updateShaderParameters (Renderer *renderer, int contextIdx)=0
 Update shader parameters. More...
 
virtual void bindTexture (Renderer *renderer, int contextIdx, int32_t textureId)=0
 Bind texture. More...
 

Static Public Member Functions

static bool isSupported (Renderer *renderer)
 

Private Attributes

int32_t uniformSpeed { -1 }
 

Additional Inherited Members

- Protected Attributes inherited from LightingShaderBaseImplementation
int32_t programId { -1 }
 
int32_t fragmentShaderId { -1 }
 
int32_t vertexShaderId { -1 }
 
int32_t uniformTextureAtlasSize { -1 }
 
int32_t uniformTextureAtlasPixelDimension { -1 }
 
int32_t uniformDiffuseTextureUnit { -1 }
 
int32_t uniformDiffuseTextureAvailable { -1 }
 
int32_t uniformDiffuseTextureMaskedTransparency { -1 }
 
int32_t uniformDiffuseTextureMaskedTransparencyThreshold { -1 }
 
int32_t uniformSpecularTextureUnit { -1 }
 
int32_t uniformSpecularTextureAvailable { -1 }
 
int32_t uniformNormalTextureUnit { -1 }
 
int32_t uniformNormalTextureAvailable { -1 }
 
int32_t uniformProjectionMatrix { -1 }
 
int32_t uniformCameraMatrix { -1 }
 
int32_t uniformCameraPosition { -1 }
 
int32_t uniformMVPMatrix { -1 }
 
int32_t uniformMVMatrix { -1 }
 
int32_t uniformNormalMatrix { -1 }
 
int32_t uniformModelMatrix { -1 }
 
int32_t uniformTextureMatrix { -1 }
 
int32_t uniformEffectColorMul { -1 }
 
int32_t uniformEffectColorAdd { -1 }
 
int32_t uniformMaterialAmbient { -1 }
 
int32_t uniformMaterialDiffuse { -1 }
 
int32_t uniformMaterialSpecular { -1 }
 
int32_t uniformMaterialEmission { -1 }
 
int32_t uniformMaterialShininess { -1 }
 
int32_t uniformMaterialReflection { -1 }
 
int32_t uniformMaterialReflectionFragmentShader { -1 }
 
int32_t uniformTime { -1 }
 
int32_t uniformApplyFoliageAnimation { -1 }
 
int32_t uniformEnvironmentMappingTextureUnit { -1 }
 
int32_t uniformEnvironmentMappingTextureAvailable { -1 }
 
int32_t uniformEnvironmentMappingPosition { -1 }
 
array< int32_t, Engine::LIGHTS_MAXuniformLightEnabled
 
array< int32_t, Engine::LIGHTS_MAXuniformLightAmbient
 
array< int32_t, Engine::LIGHTS_MAXuniformLightDiffuse
 
array< int32_t, Engine::LIGHTS_MAXuniformLightSpecular
 
array< int32_t, Engine::LIGHTS_MAXuniformLightPosition
 
array< int32_t, Engine::LIGHTS_MAXuniformLightSpotDirection
 
array< int32_t, Engine::LIGHTS_MAXuniformLightSpotExponent
 
array< int32_t, Engine::LIGHTS_MAXuniformLightSpotCosCutoff
 
array< int32_t, Engine::LIGHTS_MAXuniformLightConstantAttenuation
 
array< int32_t, Engine::LIGHTS_MAXuniformLightLinearAttenuation
 
array< int32_t, Engine::LIGHTS_MAXuniformLightQuadraticAttenuation
 
array< int32_t, Engine::LIGHTS_MAXuniformLightRadius
 
array< float, 4 > defaultSceneColor {{ 0.0f, 0.0f, 0.0f, 0.0f }}
 
bool initialized { false }
 
Rendererrenderer { nullptr }
 

Detailed Description

Lighting shader implementation.

Author
Andreas Drewke
Version
$Id$

Definition at line 18 of file LightingShaderTreeImplementation.h.

Constructor & Destructor Documentation

◆ LightingShaderTreeImplementation()

Public constructor.

Parameters
rendererrenderer

Definition at line 27 of file LightingShaderTreeImplementation.cpp.

Member Function Documentation

◆ getId()

const string getId ( )
overridevirtual
Returns
shader id

Implements LightingShaderImplementation.

Definition at line 31 of file LightingShaderTreeImplementation.cpp.

◆ initialize()

void initialize ( )
overridevirtual

Initialize renderer.

Reimplemented from LightingShaderBaseImplementation.

Definition at line 35 of file LightingShaderTreeImplementation.cpp.

◆ isSupported()

bool isSupported ( Renderer renderer)
static
Returns
if supported by renderer
Parameters
rendererrenderer

Definition at line 23 of file LightingShaderTreeImplementation.cpp.

◆ registerShader()

void registerShader ( )
overridevirtual

Register shader.

Implements LightingShaderImplementation.

Definition at line 91 of file LightingShaderTreeImplementation.cpp.

◆ updateShaderParameters()

void updateShaderParameters ( Renderer renderer,
int  contextIdx 
)
overridevirtual

Update shader parameters.

Parameters
rendererrenderer
context

Implements LightingShaderBaseImplementation.

Definition at line 99 of file LightingShaderTreeImplementation.cpp.

Member Data Documentation

◆ uniformSpeed

int32_t uniformSpeed { -1 }
private

Definition at line 21 of file LightingShaderTreeImplementation.h.


The documentation for this class was generated from the following files: