Spot works
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#ifndef HYDRASHADOWBUFFERMANAGER
|
||||
#define HYDRASHADOWBUFFERMANAGER
|
||||
|
||||
#include "../engine/HydraObject.h"
|
||||
#include "HydraShadowBuffer.h"
|
||||
#include "../ecs/components/HydraDirectionalShadowSourceComponent.h"
|
||||
#include "../ecs/components/HydraSpotShadowSourceComponent.h"
|
||||
|
||||
#include <queue>
|
||||
#include <mutex>
|
||||
|
||||
class HydraShadowBufferManager : public HydraObject
|
||||
{
|
||||
public:
|
||||
void Initialise();
|
||||
void Shutdown();
|
||||
HydraID AddDirectionalShadow(HydraDirectionalShadowSourceComponent shadow);
|
||||
HydraID AddSpotShadow(HydraSpotShadowSourceComponent shadow);
|
||||
void UpdateDirectionalShadow(HydraID shadow_id, HydraDirectionalShadowSourceComponent shadow);
|
||||
void UpdateSpotShadow(HydraID shadow_id, HydraSpotShadowSourceComponent shadow);
|
||||
void RemoveDirectionalShadow(HydraID shadow_id);
|
||||
void RemoveSpotShadow(HydraID shadow_id);
|
||||
void UpdateShadowBuffer();
|
||||
private:
|
||||
std::vector<HydraDirectionalShadowSourceComponent> m_directional_shadow_buffer;
|
||||
std::vector<HydraSpotShadowSourceComponent> m_spot_shadow_buffer;
|
||||
std::queue<HydraID> m_available_dir;
|
||||
std::queue<HydraID> m_available_spot;
|
||||
uint32_t m_directional_shadow_buffer_id;
|
||||
uint32_t m_spot_shadow_buffer_id;
|
||||
std::mutex m_mutex;
|
||||
|
||||
};
|
||||
#endif /* HYDRASHADOWBUFFERMANAGER */
|
||||
Reference in New Issue
Block a user