1 /**
2 Copyright: Copyright (c) 2015-2016 Andrey Penechko.
3 License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0).
4 Authors: Andrey Penechko.
5 */
6 
7 module voxelman.core.events;
8 
9 import anchovy.irenderer;
10 import dlib.math.vector;
11 import tharsis.prof : Profiler;
12 
13 struct GameStartEvent {
14 	Profiler profiler;
15 	bool continuePropagation = true;
16 }
17 struct GameStopEvent {
18 	Profiler profiler;
19 	bool continuePropagation = true;
20 }
21 
22 struct PreUpdateEvent {
23 	double deltaTime;
24 	Profiler profiler;
25 	bool continuePropagation = true;
26 }
27 struct UpdateEvent {
28 	double deltaTime;
29 	Profiler profiler;
30 	bool continuePropagation = true;
31 }
32 struct PostUpdateEvent {
33 	double deltaTime;
34 	Profiler profiler;
35 	bool continuePropagation = true;
36 }
37 
38 // Initiate drawing in graphics plugin
39 struct RenderEvent {
40 	Profiler profiler;
41 	bool continuePropagation = true;
42 }
43 
44 // draw in 3d. With depth test
45 struct Render1Event {
46 	IRenderer renderer;
47 	Profiler profiler;
48 	bool continuePropagation = true;
49 }
50 
51 // draw 2d. without depth test. with alpha
52 struct Render2Event {
53 	IRenderer renderer;
54 	Profiler profiler;
55 	bool continuePropagation = true;
56 }
57 // draw 2d gui. without depth test. with alpha
58 struct Render3Event {
59 	IRenderer renderer;
60 	Profiler profiler;
61 	bool continuePropagation = true;
62 }
63 
64 struct WindowResizedEvent
65 {
66 	uvec2 newSize;
67 	Profiler profiler;
68 	bool continuePropagation = true;
69 }