Marked Singleton classes
This commit is contained in:
		
							parent
							
								
									11372a444e
								
							
						
					
					
						commit
						a58d3a75d3
					
				
					 10 changed files with 22 additions and 10 deletions
				
			
		
							
								
								
									
										2
									
								
								Dependencies/ShaderConductor
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								Dependencies/ShaderConductor
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1 +1 @@
 | 
				
			||||||
Subproject commit 9420a9b06a059e7def5e5da15e357281f4382015
 | 
					Subproject commit 30a77c78d24fa08f4fe5fc4428f10dbfc92717a6
 | 
				
			||||||
							
								
								
									
										2
									
								
								Dependencies/imgui
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								Dependencies/imgui
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1 +1 @@
 | 
				
			||||||
Subproject commit 242fe753d92ea26510bc7948d87df6fc6c0a5c30
 | 
					Subproject commit 419e401d1fe8e9b6e45a31b5c0a27673b5d88fdc
 | 
				
			||||||
| 
						 | 
					@ -17,7 +17,7 @@ namespace Light {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	class Instrumentor;
 | 
						class Instrumentor;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	class Application
 | 
						class Application /* singleton */
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	private:
 | 
						private:
 | 
				
			||||||
		static Application* s_Context;
 | 
							static Application* s_Context;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,11 +17,12 @@ namespace Light {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// #todo: add event categories
 | 
						// #todo: add event categories
 | 
				
			||||||
	// #todo: use ofstream in a separate thread
 | 
						// #todo: use ofstream in a separate thread
 | 
				
			||||||
	class Instrumentor
 | 
						class Instrumentor /* singleton */
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	private:
 | 
						private:
 | 
				
			||||||
		static Instrumentor* s_Context;
 | 
							static Instrumentor* s_Context;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private:
 | 
				
			||||||
		std::ofstream m_OutputFileStream;
 | 
							std::ofstream m_OutputFileStream;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		unsigned int m_CurrentSessionCount;
 | 
							unsigned int m_CurrentSessionCount;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,11 +46,12 @@
 | 
				
			||||||
namespace Light {
 | 
					namespace Light {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// #todo: extend
 | 
						// #todo: extend
 | 
				
			||||||
	class Logger
 | 
						class Logger /* singleton */
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	private:
 | 
						private:
 | 
				
			||||||
		static Logger* s_Context;
 | 
							static Logger* s_Context;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private:
 | 
				
			||||||
		Ref<spdlog::logger> m_EngineLogger, m_ClientLogger, m_FileLogger;
 | 
							Ref<spdlog::logger> m_EngineLogger, m_ClientLogger, m_FileLogger;
 | 
				
			||||||
		std::string m_LogFilePath;
 | 
							std::string m_LogFilePath;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,11 +23,13 @@ namespace Light {
 | 
				
			||||||
		Metal   // :#todo
 | 
							Metal   // :#todo
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	class GraphicsContext
 | 
						class GraphicsContext /* singleton */
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	private:
 | 
						private:
 | 
				
			||||||
		static GraphicsContext* s_Context;
 | 
							static GraphicsContext* s_Context;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Scope<UserInterface> m_UserInterface;
 | 
							Scope<UserInterface> m_UserInterface;
 | 
				
			||||||
		Scope<Renderer> m_Renderer;
 | 
							Scope<Renderer> m_Renderer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,11 +10,13 @@ namespace Light {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	class Event;
 | 
						class Event;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	class Input
 | 
						class Input /* singleton */
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	private:
 | 
						private:
 | 
				
			||||||
		static Input* s_Context;
 | 
							static Input* s_Context;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		std::array<bool, 348> m_KeyboadKeys;
 | 
							std::array<bool, 348> m_KeyboadKeys;
 | 
				
			||||||
		std::array<bool, 8> m_MouseButtons;
 | 
							std::array<bool, 8> m_MouseButtons;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,11 +8,13 @@ namespace Light {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	class Event;
 | 
						class Event;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	class LayerStack
 | 
						class LayerStack /* singleton */
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	private:
 | 
						private:
 | 
				
			||||||
		static LayerStack* s_Context;
 | 
							static LayerStack* s_Context;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		std::vector<Layer*> m_Layers;
 | 
							std::vector<Layer*> m_Layers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		std::vector<Layer*>::iterator m_Begin;
 | 
							std::vector<Layer*>::iterator m_Begin;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,11 +13,13 @@ namespace Light {
 | 
				
			||||||
	class SharedContext;
 | 
						class SharedContext;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// #todo: fix the UserIntreface mess!!
 | 
						// #todo: fix the UserIntreface mess!!
 | 
				
			||||||
	class UserInterface
 | 
						class UserInterface /* singleton */
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	private:
 | 
						private:
 | 
				
			||||||
		static UserInterface* s_Context;
 | 
							static UserInterface* s_Context;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ImGuiWindowFlags m_DockspaceFlags;
 | 
							ImGuiWindowFlags m_DockspaceFlags;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public:
 | 
						public:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,11 +9,13 @@ namespace Light {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	class SharedContext;
 | 
						class SharedContext;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	class ResourceManager
 | 
						class ResourceManager /* singleton */
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	private:
 | 
						private:
 | 
				
			||||||
		static ResourceManager* s_Context;
 | 
							static ResourceManager* s_Context;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		std::unordered_map<std::string, Ref<Shader>> m_Shaders;
 | 
							std::unordered_map<std::string, Ref<Shader>> m_Shaders;
 | 
				
			||||||
		std::unordered_map<std::string, Ref<Texture>> m_Textures;
 | 
							std::unordered_map<std::string, Ref<Texture>> m_Textures;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue