2017-03-01 03:05:54 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-04-29 09:00:34 +00:00
|
|
|
#include "hwrenderer/dynlights/hw_shadowmap.h"
|
2017-03-02 17:07:47 +00:00
|
|
|
|
2018-04-29 09:00:34 +00:00
|
|
|
class FShadowMap : public IShadowMap
|
2017-03-01 03:05:54 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
~FShadowMap() { Clear(); }
|
|
|
|
|
2017-03-08 13:12:59 +00:00
|
|
|
// Release resources
|
2018-04-29 09:00:34 +00:00
|
|
|
void Clear() override;
|
2017-03-08 13:12:59 +00:00
|
|
|
|
|
|
|
// Update shadow map texture
|
2018-04-29 09:00:34 +00:00
|
|
|
void Update() override;
|
2017-03-10 18:10:40 +00:00
|
|
|
|
2017-03-01 03:05:54 +00:00
|
|
|
private:
|
2017-03-08 13:12:59 +00:00
|
|
|
// Upload the AABB-tree to the GPU
|
2017-03-08 12:31:19 +00:00
|
|
|
void UploadAABBTree();
|
2017-03-08 13:12:59 +00:00
|
|
|
|
|
|
|
// Upload light list to the GPU
|
2017-03-01 16:17:33 +00:00
|
|
|
void UploadLights();
|
|
|
|
|
2017-03-08 13:12:59 +00:00
|
|
|
// OpenGL storage buffer with the list of lights in the shadow map texture
|
2017-03-01 16:17:33 +00:00
|
|
|
int mLightList = 0;
|
2017-03-08 13:12:59 +00:00
|
|
|
|
|
|
|
// OpenGL storage buffers for the AABB tree
|
2017-03-08 12:31:19 +00:00
|
|
|
int mNodesBuffer = 0;
|
|
|
|
int mLinesBuffer = 0;
|
2017-03-01 03:05:54 +00:00
|
|
|
};
|