This repository has been archived by the owner on Sep 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomRun.h
83 lines (68 loc) · 1.7 KB
/
CustomRun.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
2016.01.26
Created by PHJ.
*/
#ifndef _CUSTOM_RUN_H
#define _CUSTOM_RUN_H
/*
TODO : Place your code here
*/
#include "PHsCommon.h"
#include "PHsEndianness.h"
#include "PHsEntry.h"
#include "PHsEvent.h"
#include "PHsFrameManager.h"
#include "PHsInputManager.h"
#include "PHsMatrix4D.h"
#include "PHsMesh.h"
#include "PHsOpenGLExt.h"
#include "PHsShader.h"
#include "PHsTexture.h"
#include "PHsTextureManager.h"
#include "PHsTimeLine.h"
#include "PHsTransform.h"
#include "PHsVector4D.h"
#include "PHsFrameCloseEventArg.h"
#include "PHsFrameKeyEventArg.h"
#include "PHsFrameSizeEventArg.h"
#include "PHsMouseButtonEventArg.h"
#include "PHsMouseMoveEventArg.h"
#include <algorithm>
#include <Windows.h>
using namespace PHs;
namespace Custom
{
class CustomRun final :
public Entry,
public EventHandler <FrameCloseEventArg>,
public EventHandler <FrameSizeEventArg>
{
private:
static CustomRun sCustomRun;
private:
Bool bFullscr{false};
Bool bMouseGrab{false};
Int nLastMousePosX{0};
Int nLastMousePosY{0};
Mesh sMesh;
Shader sShader;
Transform sCamera;
Matrix4D sProjection;
TimeLine sTimeLine;
private:
CustomRun() = default;
CustomRun(CustomRun &&sNewCustomRun) = default;
CustomRun(const CustomRun &sNewCustomRun) = default;
~CustomRun() = default;
public:
Void createFrame();
Void destroyFrame();
Void resetMousePosition();
virtual Void entryInitialize() override;
virtual Void entryFinalize() override;
virtual Void entryFrame() override;
virtual Void onEvent(const FrameCloseEventArg &sEventArg) override;
virtual Void onEvent(const FrameSizeEventArg &sEventArg) override;
};
}
#endif