hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/platform/vulkan/vulkan_renderer.h
blob: 7d75ead449e16e9b5f218100d9d7f64904b6a4d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once

#include <glm/glm.hpp>
#include <functional>
#include <string>

namespace Donut
{
    auto vulkan_prepare_glfw() -> void;

    class VulkanRenderer
    {
    public:
        VulkanRenderer();
        ~VulkanRenderer();

        auto init(void* glfwWindow, int width, int height) -> bool;
        auto shutdown() -> void;

        auto init_im_gui() -> bool;

        auto draw_frame(const glm::vec4& clearColor, const std::function<void()>& buildUI = {}) -> void;

        auto on_resize(int width, int height) -> void;

        auto set_hdri(const std::string& path) -> void;

        auto current_hdri() const -> const std::string&;

        auto set_free_fly(bool enabled) -> void;
        auto is_free_fly() const -> bool;

    private:
        struct Impl;
        Impl* m_impl = nullptr;
    };
}