Cogs.Core
Extensions
CurtainView
Source
CurtainViewSystem.h
1
#pragma once
2
3
#include "Systems/ComponentSystem.h"
4
5
#include "CurtainViewComponent.h"
6
7
namespace
Cogs::Core::CurtainView{
8
9
struct
CurtainViewData
{
10
MaterialInstanceHandle
material;
11
MeshHandle
mesh[2];
12
TextureHandle
texture[2];
13
bool
uploading;
14
};
15
struct
CurtainViewSystem
:
public
ComponentSystemWithDataPool
<CurtainViewComponent, CurtainViewData>
16
{
17
CurtainViewSystem
(
Memory::Allocator
* allocator,
SizeType
capacity) :
ComponentSystemWithDataPool
(allocator, capacity) {}
18
19
void
initialize
(
Context
*
context
)
override
;
20
21
void
update
(
Context
*
context
)
override
;
22
23
ComponentHandle
createComponent
()
override
;
24
25
MaterialHandle
material;
26
};
27
28
}
// namespace ...
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::SizeType
ComponentIndex SizeType
Type used to track the size of pools.
Definition:
Component.h:19
Cogs::ComponentModel::ComponentHandle
Handle to a Component instance.
Definition:
Component.h:67
Cogs::Core::CurtainView::CurtainViewData
Definition:
CurtainViewSystem.h:9
Cogs::Core::CurtainView::CurtainViewSystem
Definition:
CurtainViewSystem.h:16
Cogs::Core::CurtainView::CurtainViewSystem::createComponent
ComponentHandle createComponent() override
Definition:
CurtainViewSystem.cpp:139
Cogs::Core::CurtainView::CurtainViewSystem::initialize
void initialize(Context *context) override
Initialize the system.
Definition:
CurtainViewSystem.cpp:10
Cogs::Core::ResourceHandle_t< MaterialInstance >
Generated by
1.9.6