Brenta Engine
1.2
Loading...
Searching...
No Matches
dir_light_ecs_component.hpp
1
// SPDX-License-Identifier: MIT
2
// Author: Giovanni Santini
3
// Mail: giovanni.santini@proton.me
4
// Github: @San7o
5
6
#pragma once
7
8
#ifndef BRENTA_NO_ECS
9
10
#include <brenta/renderer/renderer.hpp>
11
#include <brenta/ecs/ecs.hpp>
12
13
#include <tenno/memory.hpp>
14
15
namespace
brenta
16
{
17
18
class
DirLightEcsComponent
:
public
viotecs::Component
19
{
20
public
:
21
22
tenno::shared_ptr<DirLight> light =
nullptr
;
23
24
DirLightEcsComponent
() =
default
;
25
DirLightEcsComponent
(tenno::shared_ptr<DirLight> l)
26
{
27
this->light = l;
28
}
29
template
<
typename
U>
30
DirLightEcsComponent
(tenno::shared_ptr<U> l)
31
{
32
this->light = l;
33
}
34
35
inline
void
draw()
36
{
37
Renderer::submit_dir_light(this->light);
38
}
39
40
};
41
42
}
// namespace brenta
43
44
#endif
// BRENTA_NO_ECS
brenta::DirLightEcsComponent
Definition
dir_light_ecs_component.hpp:19
include
brenta
ecs
components
dir_light_ecs_component.hpp
Generated by
1.9.8