Copperfield Engine 0.1
C++ Game Engine
Loading...
Searching...
No Matches
engine.hpp
1#pragma once
2
4#include "globals.hpp"
5
7class ShaderManager;
9class JobSystem;
10
12class Engine {
13 public:
17 Engine(const Engine&) = delete;
19 Engine(const Engine&&) = delete;
21 Engine& operator=(const Engine&) = delete;
23 Engine& operator=(const Engine&&) = delete;
24 ~Engine();
25
28 void update() const;
29
30 void loadDefaultResources() const;
31 bool loadShaders();
32
33 inline ShaderManager& getShaders() const { return *shader_manager_; }
34
38 return *resource_manager_;
39 }
40
44 return *component_manager_;
45 }
46
47 private:
48 std::unique_ptr<ComponentManager> component_manager_;
49 std::unique_ptr<ShaderManager> shader_manager_;
50 std::unique_ptr<ResourceManager> resource_manager_;
51 std::unique_ptr<JobSystem> job_system_;
52 struct ALCdevice* device_;
53 struct ALCcontext* ctx_;
54};
Handles anything related to entities and components in the engine.
Definition: component_manager.hpp:29
Intiliazes the ComponentManager and the ResourceManager and ofers functions to retrieve them.
Definition: engine.hpp:12
ResourceManager & getResourceManager() const
Retrieves the ResourceManager.
Definition: engine.hpp:37
Engine(const Engine &&)=delete
Move constructor (deleted).
Engine & operator=(const Engine &&)=delete
Move assignment operator (deleted).
Engine()
Constructor.
Engine(const Engine &)=delete
Copy constructor (deleted).
ComponentManager & getComponentManager() const
Retrieves the ResourceManager.
Definition: engine.hpp:43
Engine & operator=(const Engine &)=delete
Copy assignment operator (deleted).
Stores and offers access to all meshes, textures, and sounds of the engine.
Definition: resource_manager.hpp:27
Defines all the components created by the engine by default.
contains globally accessible enums