From e174c500a063bb89058adafcde84bcf1f7b255ac Mon Sep 17 00:00:00 2001 From: hachem Date: Sat, 22 Aug 2026 00:46:02 +0200 Subject: [feat]: add dynamic UBO and scene manager support for vulkan --- src/platform/vulkan/vulkan_renderer.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/platform/vulkan/vulkan_renderer.h') diff --git a/src/platform/vulkan/vulkan_renderer.h b/src/platform/vulkan/vulkan_renderer.h index e6920c5..a760cb4 100644 --- a/src/platform/vulkan/vulkan_renderer.h +++ b/src/platform/vulkan/vulkan_renderer.h @@ -3,6 +3,7 @@ #include #include #include +#include // Live-window Vulkan backend: owns the instance, surface, device, swapchain, // render pass, framebuffers and per-frame synchronization, and drives the @@ -15,6 +16,14 @@ namespace Donut // macOS/Homebrew) and configures the MoltenVK ICD / layer paths. auto vulkan_prepare_glfw() -> void; + // A placeable/editable sphere in the world-builder scene view. + struct SceneObject + { + glm::vec3 position = { 0.0f, 2.0f, 0.0f }; + float radius = 2.0f; + glm::vec3 color = { 0.85f, 0.35f, 0.2f }; + }; + class VulkanRenderer { public: @@ -52,6 +61,11 @@ namespace Donut auto set_scene_mode(bool enabled) -> void; auto is_scene_mode() const -> bool; + // Runtime scene objects (spheres) drawn in scene view; the UI mutates this + // list directly. set_selected_object marks one for a rim highlight (-1 = none). + auto scene_objects() -> std::vector&; + auto set_selected_object(int index) -> void; + private: struct Impl; Impl* m_impl = nullptr; -- cgit v1.3