Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor rendergraph #533

Draft
wants to merge 88 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
f9d0dc7
[*] Remove unused msaa target file
IAmNotHanni May 12, 2023
85fb116
[sampler] Add wrapper for samplers
IAmNotHanni May 12, 2023
2d92705
[pipeline] Add wrapper for graphics pipelines
IAmNotHanni May 12, 2023
f140dfe
[pipeline-layout] Add wrapper for pipeline layouts
IAmNotHanni May 13, 2023
07aa64c
[make-info] Add more functions
IAmNotHanni May 13, 2023
568de1d
[gpu-texture] Use sampler wrapper (squash me)
IAmNotHanni May 17, 2023
00737f1
[render-graph] Use wrappers for pipelines and pipeline layouts (squas…
IAmNotHanni May 17, 2023
f66742e
[buffer] Add buffer wrapper
IAmNotHanni May 17, 2023
6ebdd69
[*] Use new buffer wrapper
IAmNotHanni May 17, 2023
ae04933
[*] Rewrite image wrapper
IAmNotHanni May 19, 2023
7020dd8
[render-graph] Use buffer wrapper
IAmNotHanni May 19, 2023
d4b2559
[render-graph] Simplify use of image wrapper
IAmNotHanni May 19, 2023
a2cf9d0
[render-graph] Move update of dynamic buffers into separate method
IAmNotHanni May 20, 2023
ada2e11
[image|render-graph] Improve image wrapper further
IAmNotHanni May 20, 2023
c47f810
[pipeline-builder|render-graph] Use graphics pipeline builder
IAmNotHanni May 20, 2023
59178a9
[render-graph|render-pass] Add wrapper for renderpasses
IAmNotHanni May 21, 2023
5f5ba9c
[*] Introduce update mechanism to ImGui
IAmNotHanni May 24, 2023
91dbcaa
[*] Remove renderer base class
IAmNotHanni May 24, 2023
5692271
[*] Add template for push constant ranges
IAmNotHanni May 24, 2023
226acf5
[render-graph] Remove build_pipeline_layout method
IAmNotHanni May 24, 2023
5cebeef
[*] Allow chaining rendergraph methods
IAmNotHanni May 24, 2023
f074710
[*] Move pipeline setup to stage wrapper
IAmNotHanni May 25, 2023
ac90edc
[*] Restructure renderer
IAmNotHanni Jun 1, 2023
5375033
[application|render-graph] Set texture format directly in constructor
IAmNotHanni Jun 1, 2023
fc61ec0
[render-graph] Make physical stage a physical resource
IAmNotHanni Jun 1, 2023
0242200
[render-graph] Simplify dynamic cast methods
IAmNotHanni Jun 1, 2023
844e450
[render-graph] Remove unused method
IAmNotHanni Jun 1, 2023
b8a1baa
[buffer|imgui] Improve ImGUI wrapper and update every frame
IAmNotHanni Jun 1, 2023
d4570da
[application|device] Move wait_idle to destructor of device wrapper
IAmNotHanni Jun 4, 2023
1a475e7
[application] Make depth buffer a member
IAmNotHanni Jun 4, 2023
ee8c1a8
[imgui|render-graph] Automate push constant range handling
IAmNotHanni Jun 4, 2023
cf9ec0c
[device] Query physical device properties in constructor
IAmNotHanni Jun 4, 2023
7ba29ee
[descriptors] Add new descriptor wrapper code
IAmNotHanni Jun 9, 2023
db25473
[*] Automate descriptor management and buffer updates
IAmNotHanni Jun 10, 2023
5c98148
[pipelines] Move pipeline related wrappers to subfolder
IAmNotHanni Jun 10, 2023
a5ad65d
[rendergraph] Put rendergraph compilation into smaller methods
IAmNotHanni Jun 10, 2023
87a021f
[render-graph] Improve formatting of console output
IAmNotHanni Jun 10, 2023
3fbf3b6
[render-graph] Small improvements
IAmNotHanni Jun 10, 2023
f6be7ac
[*] Cleanup
IAmNotHanni Jun 10, 2023
817f83a
[*] Small cleanup
IAmNotHanni Jun 10, 2023
512975b
[render-graph] Fix descriptor set updates
IAmNotHanni Jun 10, 2023
2baa257
[render-graph] Small cleanup
IAmNotHanni Jun 11, 2023
5aa0433
[descriptor] Fix descriptor pool management
IAmNotHanni Jun 11, 2023
a9d24c5
[application|render-graph] Omitting shader stage when specifying read…
IAmNotHanni Jun 11, 2023
d7226ba
[application] Small improvement to buffer updates
IAmNotHanni Jun 16, 2023
7728222
[descriptors] Improve overall descriptor management
IAmNotHanni Jun 16, 2023
20f9b6f
[rendergraph] Add more const
IAmNotHanni Jun 16, 2023
64fd3b4
[*] Rework descriptor management
IAmNotHanni Jun 17, 2023
33f8524
[rendergraph] Fix descriptors for combined image samplers
IAmNotHanni Jun 17, 2023
971f7c9
[*] Backup of work
IAmNotHanni Jun 18, 2023
9f38440
[*] Backup of work
IAmNotHanni Jun 18, 2023
7f16360
[instance] Switch to using Vulkan 1.3
IAmNotHanni Jun 19, 2023
a9c3b8e
[image|render-graph] Add another constructor for image wrapper
IAmNotHanni Jun 20, 2023
dffa1e8
[*] Switch to VK_EXT_debug_utils
IAmNotHanni Jun 20, 2023
12d23ac
[application|instance] Remove incorrect manual use of RenderDoc insta…
IAmNotHanni Jun 20, 2023
2f8f053
[doc] Correct use of RenderDoc in this project
IAmNotHanni Jun 20, 2023
197d1b8
[application] Remove option for disabling debug markers because they …
IAmNotHanni Jun 20, 2023
23e0957
[*] Use VK_EXT_debug_utils
IAmNotHanni Aug 2, 2023
64a9fec
[*] Move setup of debug messenger callback to instance wrapper
IAmNotHanni Aug 2, 2023
69c31d3
[*] Cleanup use of VK_EXT_debug_utils
IAmNotHanni Aug 2, 2023
a9818e7
[*] Fix debug utils
IAmNotHanni Aug 2, 2023
d1a7439
[device] Delete move constructor of device wrapper
IAmNotHanni Aug 2, 2023
53be5bd
[*] Remove misplaced methods in device wrapper
IAmNotHanni Aug 2, 2023
4039951
[*] Use debug utils naming system
IAmNotHanni Aug 2, 2023
1b979b6
[commad-buffer] Small cleanup
IAmNotHanni Aug 3, 2023
a283da7
[instance] Small cleanup
IAmNotHanni Aug 3, 2023
aae3d14
[*] Small cleanup of debug utils
IAmNotHanni Aug 3, 2023
bf30179
[swapchain] Allow vsync to be turned off again
IAmNotHanni Aug 3, 2023
6a526bf
[device] Add method for finding max sample count
IAmNotHanni Aug 3, 2023
e94d128
[*] Prepare for dynamic rendering
IAmNotHanni Aug 3, 2023
423b554
WIP
IAmNotHanni Aug 4, 2023
ab4c498
WIP
IAmNotHanni Aug 11, 2023
72530b3
[*] Use dynamic rendering
IAmNotHanni Oct 22, 2023
0cdf6eb
[*] WIP
IAmNotHanni Oct 23, 2023
92de322
[*] WIP
IAmNotHanni Oct 23, 2023
8b87f66
[*] WIP
IAmNotHanni Nov 3, 2023
d91c5e8
[*] WIP
IAmNotHanni Nov 3, 2023
160d7bf
[*] Backup of work
IAmNotHanni Nov 19, 2023
24ca21c
[*] WIP
IAmNotHanni Nov 19, 2023
9bd37ce
[*] WIP
IAmNotHanni Nov 19, 2023
d888c5b
[*] WIP
IAmNotHanni Nov 22, 2023
8258c7b
[*] WIP (broken)
IAmNotHanni Apr 10, 2024
f249425
[*] Improve set_debug_name
IAmNotHanni Apr 10, 2024
9a92d2e
[*] WIP
IAmNotHanni Apr 11, 2024
d9f98d6
[*] WIP
IAmNotHanni Apr 11, 2024
39e7e9c
[*] WIP
IAmNotHanni Apr 11, 2024
4097b45
[*] WIP
IAmNotHanni Apr 11, 2024
e71a1e7
[*] WIP
IAmNotHanni Apr 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 0 additions & 8 deletions documentation/source/development/debugging/cla.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ You can start vulkan-renderer with the following command line arguments:

.. warning:: You should never disable validation layers because they offer extensive error checks for debugging.

.. option:: --no-vk-debug-markers

Disables `Vulkan debug markers <https://www.saschawillems.de/blog/2016/05/28/tutorial-on-using-vulkans-vk_ext_debug_marker-with-renderdoc/>`__ (even if ``--renderdoc`` is specified).

.. option:: --renderdoc

Enables the `RenderDoc <https://renderdoc.org/>`__ debug layer.

.. option:: --vsync

.. warning:: Vsync is currently not implemented. The command line argument will be ignored.
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
96 changes: 1 addition & 95 deletions documentation/source/development/debugging/renderdoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,99 +2,5 @@ RenderDoc
=========

- `RenderDoc <https://renderdoc.org/>`__ is a free and open source graphics debugger for Vulkan API (and other APIs) developed by `Baldur Karlsson <https://github.com/baldurk>`__.
- It is a very powerful graphics debugging and visualization tool which makes debugging Vulkan application as easy as possible.
- Inexor has full RenderDoc integration. This includes `internal resource naming using Vulkan debug markers <https://www.saschawillems.de/blog/2016/05/28/tutorial-on-using-vulkans-vk_ext_debug_marker-with-renderdoc/>`__.
- The following tutorial shows how to debug Inexor using RenderDoc.
- It is a very powerful graphics debugging and visualization tool which simplifies debugging Vulkan application a lot.
- You can read up more details in `RenderDoc's documentation <https://renderdoc.org/docs/getting_started/quick_start.html>`__.

RenderDoc Tutorial for Windows
------------------------------

Step 1: Open Inexor in Visual Studio and add a breakpoint before Vulkan initialization
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- The best spot would be right after ``main()``:

.. image:: /development/debugging/images/renderdoc/VisualStudioBreakpoint.jpg
:width: 800
:alt: A breakpoint after the main function in Visual Studio debugger.

Step 2: Open RenderDoc.
^^^^^^^^^^^^^^^^^^^^^^^

.. image:: /development/debugging/images/renderdoc/RenderDoc_step_1.jpg
:width: 800
:alt: RenderDoc right after starting it.

Step 3: Start debugging inexor-vulkan-renderer and halt at the breakpoint
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. image:: /development/debugging/images/renderdoc/VisualStudioDebugging.jpg
:width: 800
:alt: Visual Studio interrupts the program because of a breakpoint.

Step 4: "Inject into process" inexor-vulkan-renderer.exe using RenderDoc
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. image:: /development/debugging/images/renderdoc/RenderDoc_step_2.jpg
:width: 800
:alt: "Inject into process" in RenderDoc's menu.

Step 5: Search for "inexor-vulkan-renderer.exe" and click "inject"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- You will see a warning Windows Firewall the first time you do this.
- This is because RenderDoc is reading memory from inexor-vulkan-renderer.
- Accept the Windows Firewall warning to allow RenderDoc to read memory.

.. image:: /development/debugging/images/renderdoc/RenderDoc_step_3.jpg
:width: 800
:alt: Injecting into inexor-vulkan-renderer.

Step 6: Continue debugging in Visual Studio
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- RenderDoc should now look like this.

.. image:: /development/debugging/images/renderdoc/RenderDoc_step_4.jpg
:width: 800
:alt: Injecting into inexor-vulkan-renderer.

- Press ``F5`` to continue program execution from the breakpoint.
- RenderDoc is now connected to inexor-vulkan-renderer:

.. image:: /development/debugging/images/renderdoc/RenderDoc_step_5.jpg
:width: 800
:alt: RenderDoc is connected inexor-vulkan-renderer.

- You can see RenderDoc's overlay in inexor-vulkan-renderer.exe:

.. image:: /development/debugging/images/renderdoc/RenderDoc_step_6.jpg
:width: 800
:alt: Taking a RenderDoc snapshot.

Step 7: Debug inexor-vulkan-renderer.exe as usual and press F12 to take RenderDoc snapshots
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- You can take multiple snapshots with either ``PRINT`` or ``F12`` key.

.. image:: /development/debugging/images/renderdoc/RenderDoc_step_7.jpg
:width: 800
:alt: Taking a RenderDoc snapshot.

- You can see the snapshots in RenderDoc right after you took them:

.. image:: /development/debugging/images/renderdoc/RenderDoc_step_8.jpg
:width: 800
:alt: Taking a RenderDoc snapshot.

Step 8: Open a snapshot to analyze the rendering of this frame
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Double click on a snapshot to open it:

.. image:: /development/debugging/images/renderdoc/RenderDoc_step_9.jpg
:width: 800
:alt: Taking a RenderDoc snapshot.

- Have fun inspecting!
2 changes: 1 addition & 1 deletion documentation/source/development/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Optional Software
Improve your build times with ninja.

`RenderDoc <https://renderdoc.org/>`__
Powerful open source graphics debugger. Inexor has full RenderDoc integration.
A very powerful open source graphics debugger.

`Doxygen <http://www.doxygen.nl/download.html>`__
Required for generating the documentation.
Expand Down
97 changes: 79 additions & 18 deletions include/inexor/vulkan-renderer/application.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
#pragma once

#include "inexor/vulkan-renderer/camera.hpp"
#include "inexor/vulkan-renderer/fps_counter.hpp"
#include "inexor/vulkan-renderer/imgui.hpp"
#include "inexor/vulkan-renderer/input/keyboard_mouse_data.hpp"
#include "inexor/vulkan-renderer/renderer.hpp"
#include "inexor/vulkan-renderer/octree_gpu_vertex.hpp"
#include "inexor/vulkan-renderer/render-graph/render_graph.hpp"
#include "inexor/vulkan-renderer/time_step.hpp"
#include "inexor/vulkan-renderer/vk_tools/gpu_info.hpp"
#include "inexor/vulkan-renderer/world/collision_query.hpp"
#include "inexor/vulkan-renderer/world/cube.hpp"
#include "inexor/vulkan-renderer/wrapper/instance.hpp"
#include "inexor/vulkan-renderer/wrapper/swapchain.hpp"
#include "inexor/vulkan-renderer/wrapper/window.hpp"
#include "inexor/vulkan-renderer/wrapper/window_surface.hpp"

// Forward declarations
namespace inexor::vulkan_renderer::input {
Expand All @@ -12,16 +22,65 @@ class KeyboardMouseInputData;

namespace inexor::vulkan_renderer {

class Application : public VulkanRenderer {
std::vector<std::string> m_vertex_shader_files;
std::vector<std::string> m_fragment_shader_files;
std::vector<std::string> m_texture_files;
std::vector<std::string> m_gltf_model_files;
class Application {
private:
TimeStep m_stopwatch;
FPSCounter m_fps_counter;
bool m_vsync_enabled{false};

PFN_vkDebugUtilsMessengerCallbackEXT m_debug_callbacks{VK_NULL_HANDLE};

bool m_debug_report_callback_initialised{false};

std::unique_ptr<Camera> m_camera;
std::unique_ptr<wrapper::Window> m_window;
std::unique_ptr<wrapper::Instance> m_instance;
std::unique_ptr<wrapper::Device> m_device;
std::unique_ptr<wrapper::WindowSurface> m_surface;
std::unique_ptr<wrapper::Swapchain> m_swapchain;
std::unique_ptr<ImGuiOverlay> m_imgui_overlay;

std::vector<OctreeGpuVertex> m_octree_vertices;
std::vector<std::uint32_t> m_octree_indices;

std::unique_ptr<render_graph::RenderGraph> m_render_graph;
std::weak_ptr<render_graph::Texture> m_back_buffer;
std::weak_ptr<render_graph::Texture> m_depth_buffer;
std::weak_ptr<render_graph::Texture> m_msaa_depth;
std::weak_ptr<render_graph::Texture> m_msaa_color;
std::weak_ptr<render_graph::Buffer> m_index_buffer;
std::weak_ptr<render_graph::Buffer> m_vertex_buffer;
std::weak_ptr<render_graph::Buffer> m_uniform_buffer;

std::shared_ptr<wrapper::pipelines::GraphicsPipeline> m_octree_pipeline;
std::shared_ptr<render_graph::GraphicsPass> m_octree_pass;

struct ModelViewPerspectiveMatrices {
glm::mat4 model{1.0f};
glm::mat4 view{1.0f};
glm::mat4 proj{1.0f};
} m_mvp_matrices;

std::unique_ptr<wrapper::Shader> m_vertex_shader;
std::unique_ptr<wrapper::Shader> m_fragment_shader;

void setup_render_graph();
void generate_octree_indices();
void recreate_swapchain();
void render_frame();

float m_time_passed{0.0f};

std::uint32_t m_window_width{0};
std::uint32_t m_window_height{0};
std::string m_window_title;
wrapper::Window::Mode m_window_mode{wrapper::Window::Mode::WINDOWED};
bool m_window_resized{false};

std::vector<std::string> m_gltf_model_files;
std::unique_ptr<input::KeyboardMouseInputData> m_input_data;

bool m_enable_validation_layers{true};
/// Inexor engine supports a variable number of octrees.
std::vector<std::shared_ptr<world::Cube>> m_worlds;

// If the user specified command line argument "--stop-on-validation-message", the program will call
Expand All @@ -32,20 +91,28 @@ class Application : public VulkanRenderer {
/// @brief file_name The TOML configuration file.
/// @note It was collectively decided not to use JSON for configuration files.
void load_toml_configuration_file(const std::string &file_name);
void load_textures();
void load_shaders();
/// @param initialize Initialize worlds with a fixed seed, which is useful for benchmarking and testing
void load_octree_geometry(bool initialize);
void setup_vulkan_debug_callback();
void setup_window_and_input_callbacks();
void update_imgui_overlay();
void update_uniform_buffers();
/// Use the camera's position and view direction vector to check for ray-octree collisions with all octrees.
void check_octree_collisions();
void process_mouse_input();
void process_keyboard_input();

public:
Application(int argc, char **argv);
Application(const Application &) = delete;
Application(Application &&) = delete;
~Application();

Application &operator=(const Application &) = delete;
Application &operator=(Application &&) = delete;

/// @brief Call glfwSetCursorPosCallback.
/// @param window The window that received the event.
/// @param x_pos The new x-coordinate, in screen coordinates, of the cursor.
/// @param y_pos The new y-coordinate, in screen coordinates, of the cursor.
void cursor_position_callback(GLFWwindow *window, double x_pos, double y_pos);

/// @brief Call glfwSetKeyCallback.
/// @param window The window that received the event.
Expand All @@ -55,12 +122,6 @@ class Application : public VulkanRenderer {
/// @param mods Bit field describing which modifier keys were held down.
void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods);

/// @brief Call glfwSetCursorPosCallback.
/// @param window The window that received the event.
/// @param x_pos The new x-coordinate, in screen coordinates, of the cursor.
/// @param y_pos The new y-coordinate, in screen coordinates, of the cursor.
void cursor_position_callback(GLFWwindow *window, double x_pos, double y_pos);

/// @brief Call glfwSetMouseButtonCallback.
/// @param window The window that received the event.
/// @param button The mouse button that was pressed or released.
Expand Down
84 changes: 49 additions & 35 deletions include/inexor/vulkan-renderer/imgui.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#pragma once

#include "inexor/vulkan-renderer/render_graph.hpp"
#include "inexor/vulkan-renderer/wrapper/descriptor.hpp"
#include "inexor/vulkan-renderer/wrapper/gpu_texture.hpp"
#include "inexor/vulkan-renderer/wrapper/shader.hpp"
#include "inexor/vulkan-renderer/render-graph/render_graph.hpp"

#include <glm/vec2.hpp>
#include <imgui.h>
Expand All @@ -12,55 +9,72 @@
#include <memory>
#include <vector>

// Forward declarations
namespace inexor::vulkan_renderer::wrapper {
// Forward declarations
class Device;
class Swapchain;
class Shader;
} // namespace inexor::vulkan_renderer::wrapper

namespace inexor::vulkan_renderer::render_graph {
// Forward declaration
class RenderGraph;
} // namespace inexor::vulkan_renderer::render_graph

namespace inexor::vulkan_renderer {

class ImGUIOverlay {
/// A wrapper for an ImGui implementation
class ImGuiOverlay {
const wrapper::Device &m_device;
const wrapper::Swapchain &m_swapchain;
float m_scale{1.0f};
std::weak_ptr<render_graph::Buffer> m_index_buffer;
std::weak_ptr<render_graph::Buffer> m_vertex_buffer;
std::weak_ptr<render_graph::Texture> m_imgui_texture;
std::shared_ptr<wrapper::pipelines::GraphicsPipeline> m_imgui_pipeline;
std::shared_ptr<render_graph::GraphicsPass> m_imgui_pass;
wrapper::Shader m_vertex_shader;
wrapper::Shader m_fragment_shader;

BufferResource *m_index_buffer{nullptr};
BufferResource *m_vertex_buffer{nullptr};
GraphicsStage *m_stage{nullptr};

std::unique_ptr<wrapper::GpuTexture> m_imgui_texture;
std::unique_ptr<wrapper::Shader> m_vertex_shader;
std::unique_ptr<wrapper::Shader> m_fragment_shader;
std::unique_ptr<wrapper::ResourceDescriptor> m_descriptor;
// We need to collect the vertices and indices generated by ImGui
// because it does not store them in one array, but rather in chunks
std::vector<std::uint32_t> m_index_data;
std::vector<ImDrawVert> m_vertex_data;

unsigned char *m_font_texture_data{nullptr};
int m_font_texture_width{0};
int m_font_texture_height{0};
int m_font_texture_data_size{0};

// Neither scale nor translation change
struct PushConstBlock {
glm::vec2 scale;
glm::vec2 translate;
} m_push_const_block{};
glm::vec2 scale{-1.0f};
glm::vec2 translate{-1.0f};
} m_push_const_block;

/// The user's ImGui data will be updated in this function
/// It will be called at the beginning of set_on_update
std::function<void()> m_on_update_user_data{[]() {}};

void load_font_data_from_file();

/// Customize ImGui style like text color for example
void set_imgui_style();

public:
/// @brief Construct a new ImGUI overlay.
/// Default constructor
/// @param device A reference to the device wrapper
/// @param swapchain A reference to the swapchain
/// @param render_graph A pointer to the render graph
/// @param back_buffer A pointer to the target of the ImGUI rendering
ImGUIOverlay(const wrapper::Device &device, const wrapper::Swapchain &swapchain, RenderGraph *render_graph,
TextureResource *back_buffer);
ImGUIOverlay(const ImGUIOverlay &) = delete;
ImGUIOverlay(ImGUIOverlay &&) = delete;
~ImGUIOverlay();

ImGUIOverlay &operator=(const ImGUIOverlay &) = delete;
ImGUIOverlay &operator=(ImGUIOverlay &&) = delete;
/// @param back_buffer The back buffer texture resource
/// @param depth_buffer The depth buffer texture resource
/// @param on_update_user_data The function in which the user's ImGui data is updated
ImGuiOverlay(const wrapper::Device &device, render_graph::RenderGraph &render_graph,
std::weak_ptr<render_graph::Texture> back_buffer, std::weak_ptr<render_graph::Texture> depth_buffer,
std::function<void()> on_update_user_data);

void update();
ImGuiOverlay(const ImGuiOverlay &) = delete;
ImGuiOverlay(ImGuiOverlay &&) = delete;
~ImGuiOverlay();

[[nodiscard]] float scale() const {
return m_scale;
}
ImGuiOverlay &operator=(const ImGuiOverlay &) = delete;
ImGuiOverlay &operator=(ImGuiOverlay &&) = delete;
};

} // namespace inexor::vulkan_renderer
17 changes: 0 additions & 17 deletions include/inexor/vulkan-renderer/msaa_target.hpp

This file was deleted.