From 0d8b874c0048ca088bb9e353a5f7c62e1f8cd0e8 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 14 Aug 2025 00:42:05 +0200 Subject: feat: 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 dd4c259..6212b21 100644 --- a/src/rendering/renderer.h +++ b/src/rendering/renderer.h @@ -1,10 +1,10 @@ #pragma once +#include "core/memory.h" #include "vertex_array.h" #include "shader.h" #include -#include namespace Donut { @@ -28,12 +28,12 @@ namespace Donut virtual void enable_depth_test() = 0; virtual void set_face_culling(bool enabled) = 0; - virtual void draw_indexed(const std::shared_ptr& vertex_array, + virtual void draw_indexed(const Ref& vertex_array, uint32_t index_count = 0) = 0; inline static API get_api() { return s_api; } inline static void set_api(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_renderer_api->set_face_culling(enabled); } - inline static void draw_indexed(const std::shared_ptr& vertex_array, uint32_t index_count = 0) + inline static void draw_indexed(const Ref& vertex_array, uint32_t index_count = 0) { s_renderer_api->draw_indexed(vertex_array, index_count); } private: - static std::unique_ptr s_renderer_api; + static Scope s_renderer_api; }; class Renderer @@ -88,8 +88,8 @@ namespace Donut static void on_window_resize(uint32_t width, uint32_t height); - static void submit(const std::shared_ptr& shader, - const std::shared_ptr& vertex_array, + static void submit(const Ref& shader, + const Ref& vertex_array, const glm::mat4& transform, const glm::mat4& view_projection); -- cgit v1.3