TDME2 1.9.121
Public Member Functions | Protected Attributes | List of all members
EZRShaderBaseImplementation Class Referenceabstract

Early z rejection shader base class. More...

#include <tdme/engine/subsystems/earlyzrejection/EZRShaderBaseImplementation.h>

Inheritance diagram for EZRShaderBaseImplementation:
Inheritance graph
Collaboration diagram for EZRShaderBaseImplementation:
Collaboration graph

Public Member Functions

 EZRShaderBaseImplementation (Renderer *renderer)
 Constructor. More...
 
 ~EZRShaderBaseImplementation ()
 Destructor. More...
 
virtual bool isInitialized () override
 
virtual void initialize () override
 Init EZR render shader program implementation. More...
 
virtual void useProgram (Engine *engine, int contextIdx) override
 Use EZR render shader program. More...
 
virtual void unUseProgram (int contextIdx) override
 Unuse EZR render shader program. More...
 
virtual void updateMatrices (Renderer *renderer, int contextIdx) override
 Update matrices. More...
 
virtual void updateTextureMatrix (Renderer *renderer, int contextIdx) override
 update texture matrix More...
 
virtual void updateMaterial (Renderer *renderer, int contextIdx) override
 Update material. More...
 
virtual void updateShaderParameters (Renderer *renderer, int contextIdx) override=0
 Update shader parameters. More...
 
virtual void bindTexture (Renderer *renderer, int contextIdx, int32_t textureId) override
 Bind texture. More...
 
- Public Member Functions inherited from EZRShaderImplementation
virtual ~EZRShaderImplementation ()
 Destructor. More...
 
virtual const string getId ()=0
 
virtual bool isInitialized ()=0
 
virtual void initialize ()=0
 Init EZR render shader program implementation. More...
 
virtual void useProgram (Engine *engine, int contextIdx)=0
 Use EZR render shader program. More...
 
virtual void unUseProgram (int contextIdx)=0
 Unuse EZR render shader program. More...
 
virtual void updateMatrices (Renderer *renderer, int contextIdx)=0
 Update matrices. More...
 
virtual void updateTextureMatrix (Renderer *renderer, int contextIdx)=0
 update texture matrix More...
 
virtual void updateMaterial (Renderer *renderer, int contextIdx)=0
 Update material. 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...
 

Protected Attributes

Rendererrenderer { nullptr }
 
int32_t vertexShaderId { -1 }
 
int32_t geometryShaderId { -1 }
 
int32_t fragmentShaderId {-1 }
 
int32_t programId { -1 }
 
int32_t uniformProjectionMatrix { -1 }
 
int32_t uniformCameraMatrix { -1 }
 
int32_t uniformMVPMatrix { -1 }
 
int32_t uniformTextureMatrix { -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 uniformFrame { -1 }
 
bool initialized { false }
 

Detailed Description

Early z rejection shader base class.

Author
Andreas Drewke
Version
$Id$

Definition at line 20 of file EZRShaderBaseImplementation.h.

Constructor & Destructor Documentation

◆ EZRShaderBaseImplementation()

Constructor.

Parameters
rendererrenderer

Definition at line 25 of file EZRShaderBaseImplementation.cpp.

◆ ~EZRShaderBaseImplementation()

Destructor.

Definition at line 31 of file EZRShaderBaseImplementation.cpp.

Member Function Documentation

◆ bindTexture()

void bindTexture ( Renderer renderer,
int  contextIdx,
int32_t  textureId 
)
overridevirtual

Bind texture.

Parameters
rendererrenderer
contextIdxcontext index
textureIdtexture id

Implements EZRShaderImplementation.

Definition at line 126 of file EZRShaderBaseImplementation.cpp.

◆ initialize()

void initialize ( )
overridevirtual

Init EZR render shader program implementation.

Implements EZRShaderImplementation.

Reimplemented in EZRShaderDefaultImplementation.

Definition at line 39 of file EZRShaderBaseImplementation.cpp.

◆ isInitialized()

bool isInitialized ( )
overridevirtual
Returns
if initialized and ready to use

Implements EZRShaderImplementation.

Definition at line 34 of file EZRShaderBaseImplementation.cpp.

◆ unUseProgram()

void unUseProgram ( int  contextIdx)
overridevirtual

Unuse EZR render shader program.

Parameters
contextIdxcontext index

Implements EZRShaderImplementation.

Definition at line 91 of file EZRShaderBaseImplementation.cpp.

◆ updateMaterial()

void updateMaterial ( Renderer renderer,
int  contextIdx 
)
overridevirtual

Update material.

Parameters
rendererrenderer
contextIdxcontext index

Implements EZRShaderImplementation.

Definition at line 114 of file EZRShaderBaseImplementation.cpp.

◆ updateMatrices()

void updateMatrices ( Renderer renderer,
int  contextIdx 
)
overridevirtual

Update matrices.

Parameters
rendererrenderer
contextIdxcontext index

Implements EZRShaderImplementation.

Definition at line 95 of file EZRShaderBaseImplementation.cpp.

◆ updateShaderParameters()

void updateShaderParameters ( Renderer renderer,
int  contextIdx 
)
overridepure virtual

Update shader parameters.

Parameters
rendererrenderer
context

Implements EZRShaderImplementation.

Implemented in EZRShaderDefaultImplementation.

Definition at line 123 of file EZRShaderBaseImplementation.cpp.

◆ updateTextureMatrix()

void updateTextureMatrix ( Renderer renderer,
int  contextIdx 
)
overridevirtual

update texture matrix

Parameters
rendererrenderer
contextIdxcontext index

Implements EZRShaderImplementation.

Definition at line 110 of file EZRShaderBaseImplementation.cpp.

◆ useProgram()

void useProgram ( Engine engine,
int  contextIdx 
)
overridevirtual

Use EZR render shader program.

Parameters
engineengine
contextIdxcontext index

Implements EZRShaderImplementation.

Definition at line 83 of file EZRShaderBaseImplementation.cpp.

Member Data Documentation

◆ fragmentShaderId

int32_t fragmentShaderId {-1 }
protected

Definition at line 26 of file EZRShaderBaseImplementation.h.

◆ geometryShaderId

int32_t geometryShaderId { -1 }
protected

Definition at line 25 of file EZRShaderBaseImplementation.h.

◆ initialized

bool initialized { false }
protected

Definition at line 39 of file EZRShaderBaseImplementation.h.

◆ programId

int32_t programId { -1 }
protected

Definition at line 27 of file EZRShaderBaseImplementation.h.

◆ renderer

Renderer* renderer { nullptr }
protected

Definition at line 23 of file EZRShaderBaseImplementation.h.

◆ uniformCameraMatrix

int32_t uniformCameraMatrix { -1 }
protected

Definition at line 29 of file EZRShaderBaseImplementation.h.

◆ uniformDiffuseTextureAvailable

int32_t uniformDiffuseTextureAvailable { -1 }
protected

Definition at line 35 of file EZRShaderBaseImplementation.h.

◆ uniformDiffuseTextureMaskedTransparency

int32_t uniformDiffuseTextureMaskedTransparency { -1 }
protected

Definition at line 36 of file EZRShaderBaseImplementation.h.

◆ uniformDiffuseTextureMaskedTransparencyThreshold

int32_t uniformDiffuseTextureMaskedTransparencyThreshold { -1 }
protected

Definition at line 37 of file EZRShaderBaseImplementation.h.

◆ uniformDiffuseTextureUnit

int32_t uniformDiffuseTextureUnit { -1 }
protected

Definition at line 34 of file EZRShaderBaseImplementation.h.

◆ uniformFrame

int32_t uniformFrame { -1 }
protected

Definition at line 38 of file EZRShaderBaseImplementation.h.

◆ uniformMVPMatrix

int32_t uniformMVPMatrix { -1 }
protected

Definition at line 30 of file EZRShaderBaseImplementation.h.

◆ uniformProjectionMatrix

int32_t uniformProjectionMatrix { -1 }
protected

Definition at line 28 of file EZRShaderBaseImplementation.h.

◆ uniformTextureAtlasPixelDimension

int32_t uniformTextureAtlasPixelDimension { -1 }
protected

Definition at line 33 of file EZRShaderBaseImplementation.h.

◆ uniformTextureAtlasSize

int32_t uniformTextureAtlasSize { -1 }
protected

Definition at line 32 of file EZRShaderBaseImplementation.h.

◆ uniformTextureMatrix

int32_t uniformTextureMatrix { -1 }
protected

Definition at line 31 of file EZRShaderBaseImplementation.h.

◆ vertexShaderId

int32_t vertexShaderId { -1 }
protected

Definition at line 24 of file EZRShaderBaseImplementation.h.


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