diff options
| author | hachem <im@hachem.wtf> | 2026-08-23 17:21:37 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-23 17:21:37 +0200 |
| commit | 3fd33ecff7472e4d6fc9e6b3905f56982e497ef2 (patch) | |
| tree | 66e5812f1a18b926e88a0dd549fe14e7c7327165 /src/platform/vulkan/vulkan_renderer.h | |
| parent | e3aa33fc9a99d8b817bda42a567a4c347e18ab32 (diff) | |
[feat]: complete RHI api
Diffstat (limited to 'src/platform/vulkan/vulkan_renderer.h')
| -rw-r--r-- | src/platform/vulkan/vulkan_renderer.h | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/platform/vulkan/vulkan_renderer.h b/src/platform/vulkan/vulkan_renderer.h deleted file mode 100644 index d583f07..0000000 --- a/src/platform/vulkan/vulkan_renderer.h +++ /dev/null @@ -1,50 +0,0 @@ -#pragma once - -#include "rendering/renderer_backend.h" - -// Live-window Vulkan backend: owns the instance, surface, device, swapchain, -// render pass, framebuffers and per-frame synchronization, and drives the -// acquire -> record -> submit -> present loop. Implements the shared -// RendererBackend interface (SceneObject / BlackHoleParams live there). Pure-C++ -// header (no vulkan.h / glfw leak); the GLFW window is passed as an opaque handle. -namespace Donut -{ - // Must be called BEFORE glfwInit() when the Vulkan API is selected: points - // GLFW at the loader the app links against (GLFW's own dlopen fails on - // macOS/Homebrew) and configures the MoltenVK ICD / layer paths. - auto vulkan_prepare_glfw() -> void; - - class VulkanRenderer : public RendererBackend - { - public: - VulkanRenderer(); - ~VulkanRenderer() override; - - // glfwWindow must be a GLFW window created with GLFW_NO_API. - auto init(void* glfwWindow, int width, int height) -> bool override; - auto init_ui() -> bool override; - auto shutdown() -> void override; - auto resize(int width, int height) -> void override; - - auto draw_frame(const glm::vec4& clear_color, - const std::function<void()>& build_ui) -> void override; - - auto set_scene_mode(bool enabled) -> void override; - auto is_scene_mode() const -> bool override; - auto set_free_fly(bool enabled) -> void override; // seeds the fly pose from the orbital framing - auto is_free_fly() const -> bool override; - auto reset_camera() -> void override; - - auto set_hdri(const std::string& path) -> void override; // rebuilds the cubemap (device-idle) - auto current_hdri() const -> const std::string& override; - auto scene_objects() -> std::vector<SceneObject>& override; - auto set_selected_object(int index) -> void override; - auto black_hole_params() -> BlackHoleParams& override; - - auto device_name() const -> const std::string& override; - - private: - struct Impl; - Impl* m_impl = nullptr; - }; -} |
