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/Renderer.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Rendering/Renderer.h') diff --git a/src/Rendering/Renderer.h b/src/Rendering/Renderer.h index 61dae82..fa37fc8 100644 --- a/src/Rendering/Renderer.h +++ b/src/Rendering/Renderer.h @@ -1,10 +1,10 @@ #pragma once +#include "Core/Memory.h" #include "VertexArray.h" #include "Shader.h" #include -#include namespace Donut { @@ -28,12 +28,12 @@ namespace Donut virtual void EnableDepthTest() = 0; virtual void SetFaceCulling(bool enabled) = 0; - virtual void DrawIndexed(const std::shared_ptr& vertexArray, + virtual void DrawIndexed(const Ref& vertexArray, uint32_t indexCount = 0) = 0; inline static API GetAPI() { return s_API; } inline static void SetAPI(API api) { s_API = api; } - static std::unique_ptr Create(); + static Scope Create(); private: static API s_API; }; @@ -71,13 +71,13 @@ namespace Donut s_RendererAPI->SetFaceCulling(enabled); } - inline static void DrawIndexed(const std::shared_ptr& vertexArray, uint32_t indexCount = 0) + inline static void DrawIndexed(const Ref& vertexArray, uint32_t indexCount = 0) { s_RendererAPI->DrawIndexed(vertexArray, indexCount); } private: - static std::unique_ptr s_RendererAPI; + static Scope s_RendererAPI; }; class Renderer @@ -88,8 +88,8 @@ namespace Donut static void OnWindowResize(uint32_t width, uint32_t height); - static void Submit(const std::shared_ptr& shader, - const std::shared_ptr& vertexArray, + static void Submit(const Ref& shader, + const Ref& vertexArray, const glm::mat4& transform, const glm::mat4& viewProjection); -- cgit v1.3