|
@@ -12,6 +12,12 @@
|
|
|
|
|
|
#include "imgui.h" // IMGUI_IMPL_API
|
|
#include "imgui.h" // IMGUI_IMPL_API
|
|
|
|
|
|
|
|
+//-----------------------------------------------------------------------------
|
|
|
|
+// ObjC API
|
|
|
|
+//-----------------------------------------------------------------------------
|
|
|
|
+
|
|
|
|
+#ifdef __OBJC__
|
|
|
|
+
|
|
@class MTLRenderPassDescriptor;
|
|
@class MTLRenderPassDescriptor;
|
|
@protocol MTLDevice, MTLCommandBuffer, MTLRenderCommandEncoder;
|
|
@protocol MTLDevice, MTLCommandBuffer, MTLRenderCommandEncoder;
|
|
|
|
|
|
@@ -27,3 +33,35 @@ IMGUI_IMPL_API bool ImGui_ImplMetal_CreateFontsTexture(id<MTLDevice> device);
|
|
IMGUI_IMPL_API void ImGui_ImplMetal_DestroyFontsTexture();
|
|
IMGUI_IMPL_API void ImGui_ImplMetal_DestroyFontsTexture();
|
|
IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(id<MTLDevice> device);
|
|
IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(id<MTLDevice> device);
|
|
IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects();
|
|
IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects();
|
|
|
|
+
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+//-----------------------------------------------------------------------------
|
|
|
|
+// C++ API
|
|
|
|
+//-----------------------------------------------------------------------------
|
|
|
|
+
|
|
|
|
+// Enable Metal C++ binding support with '#define IMGUI_IMPL_METAL_CPP' in your imconfig.h file
|
|
|
|
+// More info about using Metal from C++: https://developer.apple.com/metal/cpp/
|
|
|
|
+
|
|
|
|
+#ifdef IMGUI_IMPL_METAL_CPP
|
|
|
|
+
|
|
|
|
+#include <Metal/Metal.hpp>
|
|
|
|
+
|
|
|
|
+#ifndef __OBJC__
|
|
|
|
+
|
|
|
|
+IMGUI_IMPL_API bool ImGui_ImplMetal_Init(MTL::Device* device);
|
|
|
|
+IMGUI_IMPL_API void ImGui_ImplMetal_Shutdown();
|
|
|
|
+IMGUI_IMPL_API void ImGui_ImplMetal_NewFrame(MTL::RenderPassDescriptor* renderPassDescriptor);
|
|
|
|
+IMGUI_IMPL_API void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data,
|
|
|
|
+ MTL::CommandBuffer* commandBuffer,
|
|
|
|
+ MTL::RenderCommandEncoder* commandEncoder);
|
|
|
|
+
|
|
|
|
+// Called by Init/NewFrame/Shutdown
|
|
|
|
+IMGUI_IMPL_API bool ImGui_ImplMetal_CreateFontsTexture(MTL::Device* device);
|
|
|
|
+IMGUI_IMPL_API void ImGui_ImplMetal_DestroyFontsTexture();
|
|
|
|
+IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(MTL::Device* device);
|
|
|
|
+IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects();
|
|
|
|
+
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#endif
|