SpiecsEngine
 
Loading...
Searching...
No Matches
ResourceSystem.cpp
Go to the documentation of this file.
1/**
2* @file ResourceSystem.cpp.
3* @brief The ResourceSystem Class Implementation.
4* @author Spices.
5*/
6
7#include "Pchheader.h"
9#include "Resources/ResourcePool/ResourcePool.h"
10#include "Resources/Texture/Transcoder.h"
11
12#include "Resources/Texture/Texture.h"
13#include "Resources/Material/Material.h"
14#include "Resources/Mesh/Mesh.h"
15#include "Resources/Shader/Shader.h"
16
17namespace Spices {
18
20
22 {
24
25 /**
26 * @brief Create Default Resource in different ResourccePool.
27 */
28 ResourcePool<Texture>::Load<Texture2D>("default.jpg", "default.jpg");
29
30 ResourcePool<MeshPack>::Load<SpherePack>("Sphere")->OnCreatePack();
31 ResourcePool<MeshPack>::Load<PlanePack>("Plane")->OnCreatePack();
32 ResourcePool<MeshPack>::Load<CubePack>("Cube")->OnCreatePack();
33 }
34
36 {
38
39 /**
40 * @brief Release all Resources
41 */
42 ResourcePool<Texture> ::Destroy();
43 ResourcePool<Shader> ::Destroy();
44 ResourcePool<Material> ::Destroy();
45 ResourcePool<MeshPack> ::Destroy();
46 }
47
49 {
50 }
51
53 {
54 }
55
56 void ResourceSystem::RegistryResourceFolder(const std::string& folder)
57 {
58 m_ResourceSearchFolder.push_back(folder);
59 }
60
61}
#define SPICES_PROFILE_ZONE
This Class is the basic Event Class. Inherit from it and create specific event class.
Definition Event.h:96
virtual void OnSystemShutDown() override
This interface defines the behave on specific system shutdown. Called when system poped from SystemMa...
virtual void OnSystemInitialize() override
This interface defines the behave on specific system initialized. Called when system Pushed to System...
virtual void OnSystemUpdate(TimeStep &ts) override
This interface defines the behave on specific system updated every frame.
static std::vector< std::string > m_ResourceSearchFolder
Registry Resource Search Folder.
static void RegistryResourceFolder(const std::string &folder)
Registry Resource Search Folder.
virtual void OnEvent(Event &event) override
This interface defines the behave on global event function pointer is called.
ResourceSystem Class. Handles resource load/unload event.
This Class handles our engine time step during frames. Global Unique.
Definition TimeStep.h:22