16 using std::unique_ptr;
80 void reshape(int32_t width, int32_t height);
142 void setShader(
int contextIdx,
const string&
id);
160 void bindTexture(
int contextIdx, int32_t textureId);
void updateDepthBiasMVPMatrix(int contextIdx, Matrix4x4 &depthBiasMVPMatrix)
Update depth bias mvp matrix with given matrix.
Matrix4x4 shadowTransformMatrix
void reshape(int32_t width, int32_t height)
Reshape shadow maps.
ShadowMapping_RunState runState
void updateLight(int contextIdx, int32_t lightId)
Update light.
void updateMatrices(int contextIdx)
Update matrices.
ShadowMap * getShadowMap(int idx)
Get shadow map.
~ShadowMapping()
Destructor.
Matrix4x4 depthBiasMVPMatrix
void createShadowMaps()
Create shadow maps.
void setShader(int contextIdx, const string &id)
Set shader.
EntityRenderer * entityRenderer
ShadowMapping(Engine *engine, Renderer *renderer, EntityRenderer *entityRenderer)
Constructor.
void updateTextureMatrix(int contextIdx)
Update texture matrix.
void updateShaderParameters(int contextIdx)
Update shader parameters.
vector< unique_ptr< ShadowMap > > shadowMaps
void dispose()
Dispose shadow maps.
void startObjectTransform(int contextIdx, Matrix4x4 &transformMatrix)
Start object transform.
void updateMaterial(int contextIdx)
Update material.
void renderShadowMaps(const vector< Object * > &visibleObjects)
Render shadow maps to world.
void bindTexture(int contextIdx, int32_t textureId)
Bind texture.
void endObjectTransform()
End object transform.
vector< Object * > visibleObjectsReceivingShadows
Matrix4x4 class representing matrix4x4 mathematical structure and operations for 3d space.
Vector3 class representing vector3 mathematical structure and operations with x, y,...
Vector4 class representing vector4 mathematical structure and operations with x, y,...
#define FORBID_CLASS_COPY(CLASS)