NRE_GraphicsSystem.hpp
Go to the documentation of this file.
1 
10  #pragma once
11 
12  #include "Window/NRE_Window.hpp"
13 
14  #include <Utility/String/NRE_String.hpp>
15  #include <Utility/UnorderedMap/NRE_UnorderedMap.hpp>
16 
21  namespace NRE {
26  namespace System {
27 
33  private : // Fields
34  Utility::UnorderedMap<Graphics::Id, Graphics::Window*> windows;
35  Graphics::Id counter;
36  bool running;
38  public : // Methods
39  //## Constructor ##//
44 
45  //## Copy Constructor ##//
50  GraphicsSystem(GraphicsSystem const& sys) = delete;
51 
52  //## Move Constructor ##//
57  GraphicsSystem(GraphicsSystem && sys) = delete;
58 
59  //## Deconstructor ##//
64 
65  //## Getter ##//
71  Graphics::Window& getWindow(Graphics::Id id);
76  void closeWindow(Graphics::Id id);
80  bool isRunning() const;
81 
82  //## Methods ##//
92  Graphics::Window& createWindow(Utility::String const& title, Math::Point2D<unsigned int> const& position, Math::Vector2D<unsigned int> const& size, unsigned int style, Graphics::ContextAttributes const& attr);
101  Graphics::Window& createWindow(Utility::String const& title, Math::Vector2D<unsigned int> const& size, unsigned int style, Graphics::ContextAttributes const& attr);
106  void removeWindow(Graphics::Id const& id);
107 
108  //## Assignment Operator ##//
114  GraphicsSystem& operator =(GraphicsSystem const& sys) = delete;
120  GraphicsSystem& operator =(GraphicsSystem && sys) = delete;
121 
122  private : // Methods
126  void checkRunningState();
127  };
128  }
129  }
130 
131  #include "NRE_GraphicsSystem.tpp"
Manage a graphics window.
Definition: NRE_Window.hpp:34
void closeWindow(Graphics::Id id)
Definition: NRE_GraphicsSystem.cpp:25
Graphics::Window & getWindow(Graphics::Id id)
Manage the graphics sub system.
Definition: NRE_GraphicsSystem.hpp:32
System&#39;s API.
The NearlyRealEngine&#39;s global namespace.
Declaration of Graphics&#39;s API&#39;s Object : Window.
Graphics::Window & createWindow(Utility::String const &title, Math::Point2D< unsigned int > const &position, Math::Vector2D< unsigned int > const &size, unsigned int style, Graphics::ContextAttributes const &attr)
void removeWindow(Graphics::Id const &id)
Regroup all attributes needed in a GL context, should be modified before creation.
Definition: NRE_ContextAttributes.hpp:52
~GraphicsSystem()
Definition: NRE_GraphicsSystem.cpp:19
GraphicsSystem & operator=(GraphicsSystem const &sys)=delete