-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestGame.cpp
43 lines (35 loc) · 1.26 KB
/
TestGame.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "TestGame.h"
#include "Def.h"
NSP_GLM
TestGame::TestGame() : Game(),
Light(vec3(1.0f, 0.3f, 0.2f), 1.0f, vec3(0.0f, 0.0f, 1.0f)),
Light1(vec3(0.0f, 0.9f, 0.0f), 1.0f, 2, 1, 1, vec3(0.0f, 1.2f, 0.0f)),
Light2(vec3(0.0f, 0.0f, 0.9f), 1.0f, 1, 2, 4, vec3(0.0f, 1.2f, 0.0f), vec3(0.0f, -1.0f, 0.0f), 0.3f),
m(0, 2, 32),
obj(string("assets/mesh/untitled.obj"), string("assets/textures/Test_tex2.bmp")),
trans(0, vec3(), vec3(), vec3(2.0f, 2.0f, 2.0f)),
_testField( getEngine()->getThreadManager(), &getScene().getCam(), 50, 50)
{
//Rendering Registry
getEngine()->getGraphicEngine()->registerGraphicObject(&Light);
getEngine()->getGraphicEngine()->registerGraphicObject(&Light1);
getEngine()->getGraphicEngine()->registerGraphicObject(&Light2);
//scene Registry
//trans.add(&obj);
trans.add(&_testField);
m.add(&trans);
Light.add(&m);
Light1.add(&m);
Light2.add(&m);
getScene().addObj(&Light);
getScene().addObj(&Light1);
getScene().addObj(&Light2);
/*
getScene().setRootUI(UI(this));
getScene().addObj(new UIButton(getScene().getMenu(), vec2(-0.2f, -0.2f), vec2(0.2f, 0.2f), -1, [this] {getScene().toggleMenu(); }));
getScene().addObj(new UIPart(getScene().getMenu(), vec2(1.0f, -1.0f), vec2(1.0f, 1.0f))); //add Background
*/
}
TestGame::~TestGame()
{
}