aboutsummaryrefslogtreecommitdiff
path: root/3rdparty/imgui/backend/imgui_impl_metal.h
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-03-27 23:01:07 -0700
committerrtk0c <[email protected]>2021-03-27 23:01:07 -0700
commit442d2d75d71bbc057e667edc301a79fa1cc813be (patch)
treeb5d1e5068a4d481bc6bcd72dca851ac7a85bf7e4 /3rdparty/imgui/backend/imgui_impl_metal.h
Initial setup
Diffstat (limited to '3rdparty/imgui/backend/imgui_impl_metal.h')
-rw-r--r--3rdparty/imgui/backend/imgui_impl_metal.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/3rdparty/imgui/backend/imgui_impl_metal.h b/3rdparty/imgui/backend/imgui_impl_metal.h
new file mode 100644
index 0000000..1db7d87
--- /dev/null
+++ b/3rdparty/imgui/backend/imgui_impl_metal.h
@@ -0,0 +1,28 @@
+// dear imgui: Renderer Backend for Metal
+// This needs to be used along with a Platform Backend (e.g. OSX)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'MTLTexture' as ImTextureID. Read the FAQ about ImTextureID!
+// [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
+// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
+// Read online: https://github.com/ocornut/imgui/tree/master/docs
+
+#include "imgui.h" // IMGUI_IMPL_API
+
+@class MTLRenderPassDescriptor;
+@protocol MTLDevice, MTLCommandBuffer, MTLRenderCommandEncoder;
+
+IMGUI_IMPL_API bool ImGui_ImplMetal_Init(id<MTLDevice> device);
+IMGUI_IMPL_API void ImGui_ImplMetal_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplMetal_NewFrame(MTLRenderPassDescriptor* renderPassDescriptor);
+IMGUI_IMPL_API void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data,
+ id<MTLCommandBuffer> commandBuffer,
+ id<MTLRenderCommandEncoder> commandEncoder);
+
+// Called by Init/NewFrame/Shutdown
+IMGUI_IMPL_API bool ImGui_ImplMetal_CreateFontsTexture(id<MTLDevice> device);
+IMGUI_IMPL_API void ImGui_ImplMetal_DestroyFontsTexture();
+IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(id<MTLDevice> device);
+IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects();