Cogs.Core
CameraArraySystem.h
1#pragma once
2
3#include "Systems/ComponentSystem.h"
4#include "Systems/Core/CameraSystem.h"
5#include "Components/Core/CameraArrayComponent.h"
6#include "Renderer/ParameterBuffers.h"
7
8namespace Cogs::Core
9{
10 class Context;
11
13 {
14 enum struct TextureMode : uint8_t {
15 None,
16 TextureArray,
17 ArrayOfTextures
18 };
19
20 enum struct DepthMode : uint8_t {
21 None,
22 Create,
23 Provided,
24 };
25
26 CameraData camData;
27 RenderPassOptions passOptions{}; // Tweaked options for multi-draw
28 std::string pipeline;
29 std::vector<ViewBufferEntry> viewBuffer;
30 std::vector<TextureHandle> colorTextures;
31 std::vector<TextureHandle> depthTextures;
32
33 uint32_t numViews = 0;
34 TextureMode textureMode = TextureMode::None;
35 DepthMode depthMode = DepthMode::None;
36 };
37
38 class CameraArraySystem : public ComponentSystemWithDataPool<CameraArrayComponent, CameraArrayData>
39 {
41 public:
42 CameraArraySystem(Memory::Allocator * allocator, SizeType capacity) :
43 ComponentSystemWithDataPool(allocator, capacity)
44 {}
45
46 void update(Context* context) override;
47
48 };
49}
Context * context
Pointer to the Context instance the system lives in.
void update()
Updates the system state to that of the current frame.
Component system with parallel data per component stored in a pool similar to how the components them...
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
Base allocator implementation.
Definition: Allocator.h:30
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
ComponentIndex SizeType
Type used to track the size of pools.
Definition: Component.h:19
Contains data describing a Camera instance and its derived data structured such as matrix data and vi...
Definition: CameraSystem.h:67