diff options
| author | hachem <im@hachem.wtf> | 2026-08-22 00:46:02 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-22 00:46:02 +0200 |
| commit | e174c500a063bb89058adafcde84bcf1f7b255ac (patch) | |
| tree | 0185bd7974ff6b0a368186aaceea8c2321a89f7c /src/platform/vulkan/vulkan_renderer.h | |
| parent | f9b536a01f9e217a46e5b3c5a8d4a0dfb80e0ee8 (diff) | |
[feat]: add dynamic UBO and scene manager support for vulkan
Diffstat (limited to 'src/platform/vulkan/vulkan_renderer.h')
| -rw-r--r-- | src/platform/vulkan/vulkan_renderer.h | 14 |
1 files changed, 14 insertions, 0 deletions
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 <glm/glm.hpp> #include <functional> #include <string> +#include <vector> // 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<SceneObject>&; + auto set_selected_object(int index) -> void; + private: struct Impl; Impl* m_impl = nullptr; |
