Marked Singleton classes

This commit is contained in:
Light 2021-10-05 06:54:08 +03:30
parent 11372a444e
commit a58d3a75d3
10 changed files with 22 additions and 10 deletions

@ -1 +1 @@
Subproject commit 9420a9b06a059e7def5e5da15e357281f4382015
Subproject commit 30a77c78d24fa08f4fe5fc4428f10dbfc92717a6

2
Dependencies/imgui vendored

@ -1 +1 @@
Subproject commit 242fe753d92ea26510bc7948d87df6fc6c0a5c30
Subproject commit 419e401d1fe8e9b6e45a31b5c0a27673b5d88fdc

View file

@ -17,7 +17,7 @@ namespace Light {
class Instrumentor;
class Application
class Application /* singleton */
{
private:
static Application* s_Context;

View file

@ -17,11 +17,12 @@ namespace Light {
// #todo: add event categories
// #todo: use ofstream in a separate thread
class Instrumentor
class Instrumentor /* singleton */
{
private:
static Instrumentor* s_Context;
private:
std::ofstream m_OutputFileStream;
unsigned int m_CurrentSessionCount;

View file

@ -46,11 +46,12 @@
namespace Light {
// #todo: extend
class Logger
class Logger /* singleton */
{
private:
static Logger* s_Context;
private:
Ref<spdlog::logger> m_EngineLogger, m_ClientLogger, m_FileLogger;
std::string m_LogFilePath;

View file

@ -23,11 +23,13 @@ namespace Light {
Metal // :#todo
};
class GraphicsContext
class GraphicsContext /* singleton */
{
private:
static GraphicsContext* s_Context;
private:
Scope<UserInterface> m_UserInterface;
Scope<Renderer> m_Renderer;

View file

@ -10,11 +10,13 @@ namespace Light {
class Event;
class Input
class Input /* singleton */
{
private:
static Input* s_Context;
private:
std::array<bool, 348> m_KeyboadKeys;
std::array<bool, 8> m_MouseButtons;

View file

@ -8,11 +8,13 @@ namespace Light {
class Event;
class LayerStack
class LayerStack /* singleton */
{
private:
static LayerStack* s_Context;
private:
std::vector<Layer*> m_Layers;
std::vector<Layer*>::iterator m_Begin;

View file

@ -13,11 +13,13 @@ namespace Light {
class SharedContext;
// #todo: fix the UserIntreface mess!!
class UserInterface
class UserInterface /* singleton */
{
private:
static UserInterface* s_Context;
private:
ImGuiWindowFlags m_DockspaceFlags;
public:

View file

@ -9,11 +9,13 @@ namespace Light {
class SharedContext;
class ResourceManager
class ResourceManager /* singleton */
{
private:
static ResourceManager* s_Context;
private:
std::unordered_map<std::string, Ref<Shader>> m_Shaders;
std::unordered_map<std::string, Ref<Texture>> m_Textures;