TDME2 1.9.121
Classes | Public Member Functions | Private Attributes | List of all members
EZRShader Class Referencefinal

Early z rejection shader. More...

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

Collaboration diagram for EZRShader:
Collaboration graph

Classes

struct  EZRShaderContext
 

Public Member Functions

 EZRShader (Renderer *renderer)
 Constructor. More...
 
 ~EZRShader ()
 Destructor. More...
 
bool isInitialized ()
 
void initialize ()
 Init EZR shader. More...
 
void useProgram (Engine *engine)
 Use EZR render shader program. More...
 
void unUseProgram ()
 Unuse EZR render shader program. More...
 
void updateMatrices (int contextIdx)
 Update program matrices. More...
 
void updateTextureMatrix (int contextIdx)
 Set up program texture matrix. More...
 
void updateMaterial (int contextIdx)
 Update material. More...
 
void bindTexture (int contextIdx, int32_t textureId)
 Bind texture. More...
 
void setShader (int contextIdx, const string &id)
 Set shader. More...
 
void updateShaderParameters (int contextIdx)
 Update shader parameters. More...
 

Private Attributes

unordered_map< string, EZRShaderImplementation * > shader
 
bool running { false }
 
Engineengine { nullptr }
 
Rendererrenderer { nullptr }
 
vector< EZRShaderContextcontexts
 

Detailed Description

Early z rejection shader.

Author
Andreas Drewke
Version
$Id$

Definition at line 27 of file EZRShader.h.

Constructor & Destructor Documentation

◆ EZRShader()

EZRShader ( Renderer renderer)

Constructor.

Parameters
rendererrenderer

Definition at line 30 of file EZRShader.cpp.

◆ ~EZRShader()

~EZRShader ( )

Destructor.

Definition at line 37 of file EZRShader.cpp.

Member Function Documentation

◆ bindTexture()

void bindTexture ( int  contextIdx,
int32_t  textureId 
)

Bind texture.

Parameters
rendererrenderer
contextIdxcontext index
textureIdtexture id

Definition at line 99 of file EZRShader.cpp.

◆ initialize()

void initialize ( )

Init EZR shader.

Definition at line 52 of file EZRShader.cpp.

◆ isInitialized()

bool isInitialized ( )
Returns
if initialized and ready to use

Definition at line 43 of file EZRShader.cpp.

◆ setShader()

void setShader ( int  contextIdx,
const string &  id 
)

Set shader.

Parameters
context
idshader id

Definition at line 112 of file EZRShader.cpp.

◆ unUseProgram()

void unUseProgram ( )

Unuse EZR render shader program.

Definition at line 65 of file EZRShader.cpp.

◆ updateMaterial()

void updateMaterial ( int  contextIdx)

Update material.

Parameters
rendererrenderer
contextIdxcontext index

Definition at line 92 of file EZRShader.cpp.

◆ updateMatrices()

void updateMatrices ( int  contextIdx)

Update program matrices.

Parameters
rendererrenderer
contextIdxcontext index

Definition at line 79 of file EZRShader.cpp.

◆ updateShaderParameters()

void updateShaderParameters ( int  contextIdx)

Update shader parameters.

Parameters
context

Definition at line 106 of file EZRShader.cpp.

◆ updateTextureMatrix()

void updateTextureMatrix ( int  contextIdx)

Set up program texture matrix.

Parameters
contextIdxcontext index
rendererrenderer

Definition at line 86 of file EZRShader.cpp.

◆ useProgram()

void useProgram ( Engine engine)

Use EZR render shader program.

Parameters
engineengine

Definition at line 59 of file EZRShader.cpp.

Member Data Documentation

◆ contexts

vector<EZRShaderContext> contexts
private

Definition at line 38 of file EZRShader.h.

◆ engine

Engine* engine { nullptr }
private

Definition at line 36 of file EZRShader.h.

◆ renderer

Renderer* renderer { nullptr }
private

Definition at line 37 of file EZRShader.h.

◆ running

bool running { false }
private

Definition at line 35 of file EZRShader.h.

◆ shader

unordered_map<string, EZRShaderImplementation*> shader
private

Definition at line 34 of file EZRShader.h.


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