Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
imgui_impl_glfw_vulkan.h
Go to the documentation of this file.
1 // ImGui GLFW binding with Vulkan + shaders
2 // FIXME: Changes of ImTextureID aren't supported by this binding! Please, someone add it!
3 
4 // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
5 // If you use this binding you'll need to call 5 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXX_CreateFontsTexture(), ImGui_ImplXXXX_NewFrame(), ImGui_ImplXXXX_Render() and ImGui_ImplXXXX_Shutdown().
6 // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
7 // https://github.com/ocornut/imgui
8 
9 #pragma once
10 struct GLFWwindow;
11 
12 #ifdef USING_VULKAN
13 
14 #define IMGUI_VK_QUEUED_FRAMES 2
15 
16 struct ImGui_ImplGlfwVulkan_Init_Data
17 {
18  VkAllocationCallbacks* allocator;
19  VkPhysicalDevice gpu;
20  VkDevice device;
21  VkRenderPass render_pass;
22  VkQueue graphics_queue;
23  uint32_t sub_pass;
24  VkPipelineCache pipeline_cache;
25  VkDescriptorPool descriptor_pool;
26  void(*check_vk_result)(VkResult err);
27 };
28 
29 IMGUI_API bool ImGui_ImplGlfwVulkan_Init(GLFWwindow* window, ImGui_ImplGlfwVulkan_Init_Data *init_data);
30 IMGUI_API void ImGui_ImplGlfwVulkan_Shutdown();
31 IMGUI_API void ImGui_ImplGlfwVulkan_NewFrame();
32 IMGUI_API void ImGui_ImplGlfwVulkan_Render(VkCommandBuffer command_buffer);
33 
34 // Use if you want to reset your rendering device without losing ImGui state.
35 IMGUI_API void ImGui_ImplGlfwVulkan_InvalidateFontUploadObjects();
36 IMGUI_API void ImGui_ImplGlfwVulkan_InvalidateDeviceObjects();
37 IMGUI_API bool ImGui_ImplGlfwVulkan_CreateFontsTexture(VkCommandBuffer command_buffer);
38 IMGUI_API bool ImGui_ImplGlfwVulkan_CreateDeviceObjects();
39 
40 #endif
#define IMGUI_API
Definition: imgui.h:24