imgui_impl_metal.h 1.6 KB

123456789101112131415161718192021222324252627282930
  1. // dear imgui: Renderer Backend for Metal
  2. // This needs to be used along with a Platform Backend (e.g. OSX)
  3. // Implemented features:
  4. // [X] Renderer: User texture binding. Use 'MTLTexture' as ImTextureID. Read the FAQ about ImTextureID!
  5. // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices.
  6. // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
  7. // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
  8. // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
  9. // Read online: https://github.com/ocornut/imgui/tree/master/docs
  10. #include "imgui.h" // IMGUI_IMPL_API
  11. @class MTLRenderPassDescriptor;
  12. @protocol MTLDevice, MTLCommandBuffer, MTLRenderCommandEncoder;
  13. IMGUI_IMPL_API bool ImGui_ImplMetal_Init(id<MTLDevice> device);
  14. IMGUI_IMPL_API void ImGui_ImplMetal_Shutdown();
  15. IMGUI_IMPL_API void ImGui_ImplMetal_NewFrame(MTLRenderPassDescriptor* renderPassDescriptor);
  16. IMGUI_IMPL_API void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data,
  17. id<MTLCommandBuffer> commandBuffer,
  18. id<MTLRenderCommandEncoder> commandEncoder);
  19. // Called by Init/NewFrame/Shutdown
  20. IMGUI_IMPL_API bool ImGui_ImplMetal_CreateFontsTexture(id<MTLDevice> device);
  21. IMGUI_IMPL_API void ImGui_ImplMetal_DestroyFontsTexture();
  22. IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(id<MTLDevice> device);
  23. IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects();