Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
Loading...
Searching...
No Matches
foray_lightmanager.hpp
Go to the documentation of this file.
1#pragma once
2#include "../../util/foray_dualbuffer.hpp"
3#include "../components/foray_punctuallight.hpp"
4#include "../foray_component.hpp"
5#include "../foray_lights.hpp"
6#include <unordered_map>
7
8namespace foray::scene::gcomp {
11 {
12 public:
15
16 virtual void Update(SceneUpdateInfo& updateInfo) override;
17
18 virtual int32_t GetOrder() const override { return ORDER_DEVICEUPLOAD; }
19
20 FORAY_PROPERTY_R(Buffer)
21
22 protected:
23 std::vector<SimpleLight> mSimplifiedlights;
24 std::unordered_map<ncomp::PunctualLight*, uint32_t> mComponentArrayBindings;
26 };
27} // namespace foray::scene::gcomp
Base class for implementing the update callback.
Definition foray_component.hpp:19
static const int32_t ORDER_DEVICEUPLOAD
Definition foray_component.hpp:29
Definition foray_component.hpp:95
Maintains a list of PunctualLight components.
Definition foray_lightmanager.hpp:11
virtual void Update(SceneUpdateInfo &updateInfo) override
std::unordered_map< ncomp::PunctualLight *, uint32_t > mComponentArrayBindings
Definition foray_lightmanager.hpp:24
virtual int32_t GetOrder() const override
Definition foray_lightmanager.hpp:18
void CreateOrUpdate()
Collects lights and reuploads to device.
util::DualBuffer mBuffer
Definition foray_lightmanager.hpp:25
std::vector< SimpleLight > mSimplifiedlights
Definition foray_lightmanager.hpp:23
Helper class for organizing CPU -> GPU data synchronisation. In flight data is stored on host side,...
Definition foray_dualbuffer.hpp:18
#define FORAY_PROPERTY_R(member)
Getter+Setter shorthand for reference types.
Definition foray_basics.hpp:86
Definition foray_scene_declares.hpp:16
Temporary type passed to components when updating the scene.
Definition foray_scenedrawing.hpp:49