1 module evael.renderer.graphics_device; 2 3 import evael.lib.memory.no_gc_class; 4 5 public 6 { 7 import evael.core.game_config : GraphicsSettings; 8 9 import bindbc.glfw : GLFWwindow; 10 11 import evael.renderer.graphics_buffer; 12 import evael.renderer.graphics_command; 13 import evael.renderer.shader; 14 import evael.renderer.texture; 15 16 import evael.renderer.enums.buffer_type; 17 18 import evael.utils.color; 19 } 20 21 abstract class GraphicsDevice : NoGCClass 22 { 23 protected GraphicsSettings m_graphicsSettings; 24 25 protected GLFWwindow* m_window; 26 27 /** 28 * Device constructor. 29 */ 30 @nogc 31 public this(in ref GraphicsSettings graphicsSettings) 32 { 33 this.m_graphicsSettings = graphicsSettings; 34 } 35 36 /** 37 * Device destructor. 38 */ 39 @nogc 40 public ~this() 41 { 42 43 } 44 45 @nogc 46 public abstract void beginFrame(in Color color = Color.Blue); 47 48 @nogc 49 public abstract void endFrame(); 50 51 @nogc 52 @property 53 public void window(GLFWwindow* win) 54 { 55 this.m_window = win; 56 } 57 }