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

Particles shader program. More...

#include <tdme/engine/subsystems/particlesystem/ParticlesShader.h>

Collaboration diagram for ParticlesShader:
Collaboration graph

Public Member Functions

 ParticlesShader (Engine *engine, Renderer *renderer)
 Public constructor. More...
 
bool isInitialized ()
 
void initialize ()
 Initialize renderer. More...
 
void useProgram (int contextIdx)
 Use lighting program. More...
 
void updateEffect (int contextIdx)
 Update effect to program. More...
 
void unUseProgram (int contextIdx)
 Unuse particles shader program. More...
 
void updateMatrices (int contextIdx)
 Update matrices to program. More...
 
void setParameters (int contextIdx, const array< int32_t, 16 > &textureIds)
 Set parameters. More...
 

Private Attributes

int32_t renderProgramId { -1 }
 
int32_t renderFragmentShaderId { -1 }
 
int32_t renderVertexShaderId { -1 }
 
int32_t uniformMVPMatrix { -1 }
 
array< int32_t, 16 > uniformDiffuseTextureUnits
 
int32_t uniformViewPortWidth { -1 }
 
int32_t uniformViewPortHeight { -1 }
 
int32_t uniformProjectionMatrixXx { -1 }
 
int32_t uniformProjectionMatrixYy { -1 }
 
Matrix4x4 mvpMatrix
 
bool isRunning
 
bool initialized
 
Engineengine { nullptr }
 
Rendererrenderer { nullptr }
 
array< int32_t, 16 > boundTextureIds
 

Detailed Description

Particles shader program.

Author
Andreas Drewke
Version
$Id$

Definition at line 19 of file ParticlesShader.h.

Constructor & Destructor Documentation

◆ ParticlesShader()

ParticlesShader ( Engine engine,
Renderer renderer 
)

Public constructor.

Parameters
engineengine
rendererrenderer

Definition at line 15 of file ParticlesShader.cpp.

Member Function Documentation

◆ initialize()

void initialize ( )

Initialize renderer.

Definition at line 29 of file ParticlesShader.cpp.

◆ isInitialized()

bool isInitialized ( )
Returns
initialized and ready to be used

Definition at line 24 of file ParticlesShader.cpp.

◆ setParameters()

void setParameters ( int  contextIdx,
const array< int32_t, 16 > &  textureIds 
)

Set parameters.

Parameters
contextIdxcontext index
textureIdstexture ids

Definition at line 129 of file ParticlesShader.cpp.

◆ unUseProgram()

void unUseProgram ( int  contextIdx)

Unuse particles shader program.

Parameters
contextIdxcontext index

Definition at line 102 of file ParticlesShader.cpp.

◆ updateEffect()

void updateEffect ( int  contextIdx)

Update effect to program.

Parameters
contextIdxcontext index

Definition at line 96 of file ParticlesShader.cpp.

◆ updateMatrices()

void updateMatrices ( int  contextIdx)

Update matrices to program.

Parameters
contextIdxcontext index

Definition at line 116 of file ParticlesShader.cpp.

◆ useProgram()

void useProgram ( int  contextIdx)

Use lighting program.

Parameters
contextIdxcontext index

Definition at line 85 of file ParticlesShader.cpp.

Member Data Documentation

◆ boundTextureIds

array<int32_t, 16> boundTextureIds
private

Definition at line 36 of file ParticlesShader.h.

◆ engine

Engine* engine { nullptr }
private

Definition at line 34 of file ParticlesShader.h.

◆ initialized

bool initialized
private

Definition at line 33 of file ParticlesShader.h.

◆ isRunning

bool isRunning
private

Definition at line 32 of file ParticlesShader.h.

◆ mvpMatrix

Matrix4x4 mvpMatrix
private

Definition at line 31 of file ParticlesShader.h.

◆ renderer

Renderer* renderer { nullptr }
private

Definition at line 35 of file ParticlesShader.h.

◆ renderFragmentShaderId

int32_t renderFragmentShaderId { -1 }
private

Definition at line 23 of file ParticlesShader.h.

◆ renderProgramId

int32_t renderProgramId { -1 }
private

Definition at line 22 of file ParticlesShader.h.

◆ renderVertexShaderId

int32_t renderVertexShaderId { -1 }
private

Definition at line 24 of file ParticlesShader.h.

◆ uniformDiffuseTextureUnits

array<int32_t, 16> uniformDiffuseTextureUnits
private

Definition at line 26 of file ParticlesShader.h.

◆ uniformMVPMatrix

int32_t uniformMVPMatrix { -1 }
private

Definition at line 25 of file ParticlesShader.h.

◆ uniformProjectionMatrixXx

int32_t uniformProjectionMatrixXx { -1 }
private

Definition at line 29 of file ParticlesShader.h.

◆ uniformProjectionMatrixYy

int32_t uniformProjectionMatrixYy { -1 }
private

Definition at line 30 of file ParticlesShader.h.

◆ uniformViewPortHeight

int32_t uniformViewPortHeight { -1 }
private

Definition at line 28 of file ParticlesShader.h.

◆ uniformViewPortWidth

int32_t uniformViewPortWidth { -1 }
private

Definition at line 27 of file ParticlesShader.h.


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