Add Asset system
- Add Abstract Asset class which defines Assets - Add AssetManager class to keep track of all the Asset - Add AssetFile class to cache the asset without loading it - Add UUID class to uniquely identify assets - Add MetaFile class to load meta asset files
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "copium/core/Vulkan.h"
|
||||
|
||||
#include "copium/asset/AssetManager.h"
|
||||
|
||||
namespace Copium
|
||||
{
|
||||
std::unique_ptr<Instance> Vulkan::instance;
|
||||
@@ -10,13 +12,19 @@ namespace Copium
|
||||
void Vulkan::Initialize()
|
||||
{
|
||||
instance = std::make_unique<Instance>("Copium Engine");
|
||||
window = std::make_unique<Window>( "Copium Engine", 1920, 1080, Window::Mode::Windowed);
|
||||
window = std::make_unique<Window>("Copium Engine", 1920, 1080, Window::Mode::Windowed);
|
||||
device = std::make_unique<Device>();
|
||||
swapChain = std::make_unique<SwapChain>();
|
||||
|
||||
// TODO: Make the working directory always be relative to the assets folder
|
||||
// By looking at where the executable is, since that should always be in the bin folder (it currently isn't though)
|
||||
AssetManager::RegisterAssetDir("assets/");
|
||||
}
|
||||
|
||||
void Vulkan::Destroy()
|
||||
{
|
||||
AssetManager::UnregisterAssetDir("assets/");
|
||||
AssetManager::Cleanup();
|
||||
swapChain.reset();
|
||||
device.reset();
|
||||
window.reset();
|
||||
|
||||
Reference in New Issue
Block a user