Fix gamma rendering issues
- Remove gamma correction from the Vulkan renderer - Add SamplerCreator, used to specify Min/Mag filter - Add character texture to example project - Add AnimationSystem, DebugSystem and UiRenderSystem to example project
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Copium
|
||||
std::unique_ptr<Window> Vulkan::window;
|
||||
std::unique_ptr<Device> Vulkan::device;
|
||||
std::unique_ptr<SwapChain> Vulkan::swapChain;
|
||||
AssetHandle Vulkan::emptyTexture2D;
|
||||
|
||||
void Vulkan::Initialize()
|
||||
{
|
||||
@@ -30,10 +31,12 @@ namespace Copium
|
||||
// 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/");
|
||||
emptyTexture2D = AssetManager::RegisterRuntimeAsset("empty_texture2d", std::make_unique<Texture2D>(std::vector<uint8_t>{0, 0, 0, 255}, 1, 1, SamplerCreator{}));
|
||||
}
|
||||
|
||||
void Vulkan::Destroy()
|
||||
{
|
||||
AssetManager::UnloadAsset(emptyTexture2D);
|
||||
AssetManager::UnregisterAssetDir("assets/");
|
||||
AssetManager::Cleanup();
|
||||
swapChain.reset();
|
||||
@@ -62,6 +65,11 @@ namespace Copium
|
||||
return *swapChain;
|
||||
}
|
||||
|
||||
AssetHandle Vulkan::GetEmptyTexture2D()
|
||||
{
|
||||
return emptyTexture2D;
|
||||
}
|
||||
|
||||
bool Vulkan::Valid()
|
||||
{
|
||||
return instance && window && device && swapChain;
|
||||
|
||||
Reference in New Issue
Block a user