mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-04 01:41:42 +00:00
634b3cf413
* split gl_shadowmap.cpp into a GL dependent and an API independent part. * gl_drawinfo must be kept around for the HUD sprite because it connects the renderer with the hardware indpendent part of the engine.
30 lines
560 B
C++
30 lines
560 B
C++
|
|
#pragma once
|
|
|
|
#include "hwrenderer/dynlights/hw_shadowmap.h"
|
|
|
|
class FShadowMap : public IShadowMap
|
|
{
|
|
public:
|
|
~FShadowMap() { Clear(); }
|
|
|
|
// Release resources
|
|
void Clear() override;
|
|
|
|
// Update shadow map texture
|
|
void Update() override;
|
|
|
|
private:
|
|
// Upload the AABB-tree to the GPU
|
|
void UploadAABBTree();
|
|
|
|
// Upload light list to the GPU
|
|
void UploadLights();
|
|
|
|
// OpenGL storage buffer with the list of lights in the shadow map texture
|
|
int mLightList = 0;
|
|
|
|
// OpenGL storage buffers for the AABB tree
|
|
int mNodesBuffer = 0;
|
|
int mLinesBuffer = 0;
|
|
};
|