// dear imgui: Renderer Backend for Vulkan1// This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..)23// Implemented features:4// [!] Renderer: User texture binding. Use 'VkDescriptorSet' as ImTextureID. Read the FAQ about ImTextureID! See https://github.com/ocornut/imgui/pull/914 for discussions.5// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.67// Important: on 32-bit systems, user texture binding is only supported if your imconfig file has '#define ImTextureID ImU64'.8// See imgui_impl_vulkan.cpp file for details.910// The aim of imgui_impl_vulkan.h/.cpp is to be usable in your engine without any modification.11// IF YOU FEEL YOU NEED TO MAKE ANY CHANGE TO THIS CODE, please share them and your feedback at https://github.com/ocornut/imgui/1213// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.14// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.15// Learn about Dear ImGui:16// - FAQ https://dearimgui.com/faq17// - Getting Started https://dearimgui.com/getting-started18// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).19// - Introduction, links and more at the top of imgui.cpp2021// Important note to the reader who wish to integrate imgui_impl_vulkan.cpp/.h in their own engine/app.22// - Common ImGui_ImplThin3d_XXX functions and structures are used to interface with imgui_impl_vulkan.cpp/.h.23// You will use those if you want to use this rendering backend in your engine/app.24// - Helper ImGui_ImplThin3dH_XXX functions and structures are only used by this example (main.cpp) and by25// the backend itself (imgui_impl_vulkan.cpp), but should PROBABLY NOT be used by your own engine/app code.26// Read comments in imgui_impl_vulkan.h.2728#pragma once29#ifndef IMGUI_DISABLE30#include "imgui.h" // IMGUI_IMPL_API3132#include "Common/GPU/thin3d.h"33#include "Common/Math/lin/matrix4x4.h"3435// Called by user code. Takes ownership of the font buffer and later deletes it.36IMGUI_IMPL_API bool ImGui_ImplThin3d_Init(Draw::DrawContext *draw,37const uint8_t *ttf_font_proportional, size_t proportional_size,38const uint8_t *ttf_font_fixed, size_t fixed_size);39IMGUI_IMPL_API void ImGui_ImplThin3d_Shutdown();40IMGUI_IMPL_API void ImGui_ImplThin3d_NewFrame(Draw::DrawContext *draw, Lin::Matrix4x4 drawMatrix);41IMGUI_IMPL_API void ImGui_ImplThin3d_RenderDrawData(ImDrawData* draw_data, Draw::DrawContext *draw);42IMGUI_IMPL_API bool ImGui_ImplThin3d_CreateDeviceObjects(Draw::DrawContext *draw);43IMGUI_IMPL_API void ImGui_ImplThin3d_DestroyDeviceObjects();4445enum class ImGuiPipeline {46TexturedAlphaBlend = 0,47TexturedOpaque = 1,48};4950// These register a texture for imgui drawing, but just for the current frame.51// Textures are unregistered again in RenderDrawData. This is just simpler.52IMGUI_IMPL_API ImTextureID ImGui_ImplThin3d_AddTextureTemp(Draw::Texture *texture, ImGuiPipeline pipeline = ImGuiPipeline::TexturedAlphaBlend);53IMGUI_IMPL_API ImTextureID ImGui_ImplThin3d_AddNativeTextureTemp(void *texture, ImGuiPipeline pipeline = ImGuiPipeline::TexturedAlphaBlend);54IMGUI_IMPL_API ImTextureID ImGui_ImplThin3d_AddFBAsTextureTemp(Draw::Framebuffer *framebuffer, Draw::Aspect aspect = Draw::Aspect::COLOR_BIT, ImGuiPipeline pipeline = ImGuiPipeline::TexturedAlphaBlend);5556void ImGui_PushFixedFont();57void ImGui_PopFont();5859// To get metrics etc.60ImFont *ImGui_GetFixedFont();616263// Helper structure to hold the data needed by one rendering context into one OS window64// (Used by example's main.cpp. Used by multi-viewport features. Probably NOT used by your own engine/app.)65struct ImGui_ImplThin3dH_Window {66int Width = 0;67int Height = 0;68bool ClearEnable = true;69};7071#endif // #ifndef IMGUI_DISABLE727374