1 /** 2 Copyright: Copyright (c) 2015-2018 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 voxelman.graphics.irenderer; 10 import voxelman.math; 11 12 struct GameStartEvent {} 13 struct GameStopEvent {} 14 15 struct PreUpdateEvent { 16 double deltaTime; 17 ulong frame; 18 } 19 struct UpdateEvent { 20 double deltaTime; 21 ulong frame; 22 } 23 struct PostUpdateEvent { 24 double deltaTime; 25 ulong frame; 26 } 27 struct DoGuiEvent { 28 ulong frame; 29 } 30 31 struct WorldSaveEvent {} 32 33 // Initiate drawing in graphics plugin 34 struct RenderEvent {} 35 36 // draw in 3d. With depth test 37 struct Render1Event { 38 IRenderer renderer; 39 } 40 41 // draw in 3d. With depth test 42 struct RenderSolid3dEvent { 43 IRenderer renderer; 44 } 45 46 // draw in 3d. With depth test 47 struct RenderTransparent3dEvent { 48 IRenderer renderer; 49 } 50 51 // draw 2d. without depth test. with alpha 52 struct Render2Event { 53 IRenderer renderer; 54 } 55 // draw 2d gui. without depth test. with alpha 56 struct Render3Event { 57 IRenderer renderer; 58 } 59 60 struct WindowResizedEvent 61 { 62 ivec2 newSize; 63 } 64 65 // emitted only by server plugin 66 struct WorldSaveInternalEvent {}