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

Lighting shader implementation. More...

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

Inheritance diagram for LightingShaderPBRTreeImplementation:
Inheritance graph
Collaboration diagram for LightingShaderPBRTreeImplementation:
Collaboration graph

Public Member Functions

 LightingShaderPBRTreeImplementation (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 useProgram (Engine *engine, int contextIdx) override
 Use lighting program. More...
 
virtual void updateShaderParameters (Renderer *renderer, int contextIdx) override
 Update shader parameters. More...
 
- Public Member Functions inherited from LightingShaderPBRBaseImplementation
 LightingShaderPBRBaseImplementation (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 }
 
int32_t uniformTime { -1 }
 

Additional Inherited Members

- Protected Attributes inherited from LightingShaderPBRBaseImplementation
int32_t programId { -1 }
 
int32_t fragmentShaderId { -1 }
 
int32_t vertexShaderId { -1 }
 
int32_t uniformBaseColorFactor { -1 }
 
int32_t uniformBaseColorSampler { -1 }
 
int32_t uniformBaseColorSamplerAvailable { -1 }
 
int32_t uniformAlphaCutoffEnabled { -1 }
 
int32_t uniformAlphaCutoff { -1 }
 
int32_t uniformCamera { -1 }
 
int32_t uniformExposure { -1 }
 
int32_t uniformMetallicFactor { -1 }
 
int32_t uniformMetallicRoughnessSampler { -1 }
 
int32_t uniformMetallicRoughnessSamplerAvailable { -1 }
 
int32_t uniformNormalSampler { -1 }
 
int32_t uniformNormalSamplerAvailable { -1 }
 
int32_t uniformNormalScale { -1 }
 
int32_t uniformRoughnessFactor { -1 }
 
int32_t uniformViewProjectionMatrix { -1 }
 
int32_t uniformDiffuseEnvSampler { -1 }
 
int32_t uniformSpecularEnvSampler { -1 }
 
int32_t uniformbrdfLUT { -1 }
 
int32_t textureDiffuseEnvSampler { -1 }
 
int32_t textureSpecularEnvSampler { -1 }
 
int32_t texturebrdfLUT { -1 }
 
array< int32_t, Engine::LIGHTS_MAXuniformLightEnabled
 
array< int32_t, Engine::LIGHTS_MAXuniformLightAmbient
 
array< int32_t, Engine::LIGHTS_MAXuniformLightDirection
 
array< int32_t, Engine::LIGHTS_MAXuniformLightRange
 
array< int32_t, Engine::LIGHTS_MAXuniformLightColor
 
array< int32_t, Engine::LIGHTS_MAXuniformLightIntensity
 
array< int32_t, Engine::LIGHTS_MAXuniformLightPosition
 
array< int32_t, Engine::LIGHTS_MAXuniformLightInnerConeCos
 
array< int32_t, Engine::LIGHTS_MAXuniformLightOuterConeCos
 
array< int32_t, Engine::LIGHTS_MAXuniformLightType
 
bool initialized { false }
 
Rendererrenderer { nullptr }
 

Detailed Description

Lighting shader implementation.

Author
Andreas Drewke
Version
$Id$

Definition at line 18 of file LightingShaderPBRTreeImplementation.h.

Constructor & Destructor Documentation

◆ LightingShaderPBRTreeImplementation()

Public constructor.

Parameters
rendererrenderer

Definition at line 32 of file LightingShaderPBRTreeImplementation.cpp.

Member Function Documentation

◆ getId()

const string getId ( )
overridevirtual
Returns
shader id

Implements LightingShaderImplementation.

Definition at line 36 of file LightingShaderPBRTreeImplementation.cpp.

◆ initialize()

void initialize ( )
overridevirtual

Initialize renderer.

Reimplemented from LightingShaderPBRBaseImplementation.

Definition at line 40 of file LightingShaderPBRTreeImplementation.cpp.

◆ isSupported()

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

Definition at line 28 of file LightingShaderPBRTreeImplementation.cpp.

◆ registerShader()

void registerShader ( )
overridevirtual

Register shader.

Implements LightingShaderImplementation.

Definition at line 123 of file LightingShaderPBRTreeImplementation.cpp.

◆ updateShaderParameters()

void updateShaderParameters ( Renderer renderer,
int  contextIdx 
)
overridevirtual

Update shader parameters.

Parameters
rendererrenderer
context

Implements LightingShaderPBRBaseImplementation.

Definition at line 139 of file LightingShaderPBRTreeImplementation.cpp.

◆ useProgram()

void useProgram ( Engine engine,
int  contextIdx 
)
overridevirtual

Use lighting program.

Parameters
engineengine
contextIdxcontext index

Reimplemented from LightingShaderPBRBaseImplementation.

Definition at line 131 of file LightingShaderPBRTreeImplementation.cpp.

Member Data Documentation

◆ uniformSpeed

int32_t uniformSpeed { -1 }
private

Definition at line 21 of file LightingShaderPBRTreeImplementation.h.

◆ uniformTime

int32_t uniformTime { -1 }
private

Definition at line 22 of file LightingShaderPBRTreeImplementation.h.


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