CSEngine
Loading...
Searching...
No Matches
RenderComponent.h
1
#pragma once
2
3
#include "SComponent.h"
4
#include "../Util/Render/RenderInterfaces.h"
5
#include "CameraComponent.h"
6
7
namespace
CSE {
8
9
class
DrawableStaticMeshComponent;
10
class
DrawableSkinnedMeshComponent;
11
class
LightMgr;
12
class
RenderMgr;
13
class
SMaterial;
14
15
class
RenderComponent
:
public
SComponent
,
public
SIRender
{
16
public
:
17
COMPONENT_DEFINE_CONSTRUCTOR(
RenderComponent
);
18
19
~RenderComponent
()
override
;
20
21
void
Exterminate()
override
;
22
23
void
Init()
override
;
24
25
void
Tick(
float
elapsedTime)
override
;
26
27
SComponent
* Clone(
SGameObject
*
object
)
override
;
28
29
30
void
31
SetMatrix(
const
CameraMatrixStruct
& cameraMatrixStruct,
32
const
GLProgramHandle
* handle)
override
;
33
34
void
Render(
const
GLProgramHandle
* handle)
const override
;
35
36
void
SetIsEnable(
bool
is_enable)
override
;
37
38
SMaterial
* GetMaterial()
const override
;
39
40
void
SetMaterial(
SMaterial
* material);
41
42
void
SetValue(std::string name_str, Arguments value)
override
;
43
44
std::string PrintValue()
const override
;
45
46
private
:
47
void
SetJointMatrix(
const
GLProgramHandle
* handle)
const
;
48
49
private
:
50
LightMgr
* m_lightMgr =
nullptr
;
51
RenderMgr
* m_renderMgr =
nullptr
;
52
DrawableStaticMeshComponent
* m_mesh =
nullptr
;
53
DrawableSkinnedMeshComponent
* m_skinningMesh =
nullptr
;
54
SMaterial
* m_material_clone =
nullptr
;
55
// SMaterial* material (Override)
56
bool
m_disableShadow =
false
;
57
bool
m_isPrefab =
false
;
58
};
59
}
CSE::DrawableSkinnedMeshComponent
Definition
DrawableSkinnedMeshComponent.h:8
CSE::DrawableStaticMeshComponent
Definition
DrawableStaticMeshComponent.h:8
CSE::GLProgramHandle
Definition
GLProgramHandle.h:50
CSE::LightMgr
Definition
LightMgr.h:17
CSE::RenderComponent
Definition
RenderComponent.h:15
CSE::RenderMgr
Class for managing rendering operations.
Definition
RenderMgr.h:21
CSE::SComponent
Definition
SComponent.h:17
CSE::SGameObject
Definition
SGameObject.h:17
CSE::SIRender
Definition
RenderInterfaces.h:39
CSE::SMaterial
Definition
SMaterial.h:16
CSE::CameraMatrixStruct
Definition
CameraComponent.h:8
Component
RenderComponent.h
Generated on Fri Nov 15 2024 01:09:31 for CSEngine by
1.9.8