Cogs.Core
Source
Systems
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
8
namespace
Cogs::Core
9
{
10
class
Context;
11
12
struct
CameraArrayData
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
{
40
using
base
=
ComponentSystemWithDataPool<CameraArrayComponent, CameraArrayData>
;
41
public
:
42
CameraArraySystem
(
Memory::Allocator
* allocator,
SizeType
capacity) :
43
ComponentSystemWithDataPool
(allocator, capacity)
44
{}
45
46
void
update
(
Context
*
context
)
override
;
47
48
};
49
}
Cogs::Core::CameraArraySystem
Definition:
CameraArraySystem.h:39
Cogs::Core::ComponentSystemBase::context
Context * context
Pointer to the Context instance the system lives in.
Definition:
ComponentSystem.h:136
Cogs::Core::ComponentSystemBase::update
void update()
Updates the system state to that of the current frame.
Definition:
ComponentSystem.h:65
Cogs::Core::ComponentSystemWithDataPool
Component system with parallel data per component stored in a pool similar to how the components them...
Definition:
ComponentSystem.h:365
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Memory::Allocator
Base allocator implementation.
Definition:
Allocator.h:30
Cogs::Core
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
Definition:
ComponentFunctions.h:10
Cogs::SizeType
ComponentIndex SizeType
Type used to track the size of pools.
Definition:
Component.h:19
Cogs::Core::CameraArrayData
Definition:
CameraArraySystem.h:13
Cogs::Core::CameraData
Contains data describing a Camera instance and its derived data structured such as matrix data and vi...
Definition:
CameraSystem.h:67
Cogs::Core::RenderPassOptions
Definition:
CameraSystem.h:38
Generated by
1.9.6