From e050dce79b67ae6386240567a994454711ab998d Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 14 Aug 2025 00:42:05 +0200 Subject: [add]: Custom memory managers and fix includes --- src/Rendering/Texture.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/Rendering/Texture.cpp') diff --git a/src/Rendering/Texture.cpp b/src/Rendering/Texture.cpp index 3a86dba..a96b816 100644 --- a/src/Rendering/Texture.cpp +++ b/src/Rendering/Texture.cpp @@ -1,18 +1,19 @@ #include "Texture.h" #include "Renderer.h" -#include "../Platform/OpenGL/OpenGLTexture.h" -#include "../Platform/Vulkan/VulkanTexture.h" + +#include "Platform/OpenGL/OpenGLTexture.h" +#include "Platform/Vulkan/VulkanTexture.h" namespace Donut { - std::shared_ptr Texture2D::Create(uint32_t width, uint32_t height) + Ref Texture2D::Create(uint32_t width, uint32_t height) { switch (Renderer::GetAPI()) { case RendererAPI::API::OpenGL: - return std::make_shared(width, height); + return CreateRef(width, height); case RendererAPI::API::Vulkan: - return std::make_shared(width, height); + return CreateRef(width, height); case RendererAPI::API::None: return nullptr; default: @@ -20,14 +21,14 @@ namespace Donut } } - std::shared_ptr Texture2D::Create(const std::string& path) + Ref Texture2D::Create(const std::string& path) { switch (Renderer::GetAPI()) { case RendererAPI::API::OpenGL: - return std::make_shared(path); + return CreateRef(path); case RendererAPI::API::Vulkan: - return std::make_shared(path); + return CreateRef(path); case RendererAPI::API::None: return nullptr; default: -- cgit v1.3