imgui_impl_sdlrenderer.h 1.3 KB

12345678910111213141516171819202122232425262728
  1. // dear imgui: Renderer Backend for SDL_Renderer
  2. // (Requires: SDL 2.0.17+)
  3. // Important to understand: SDL_Renderer is an _optional_ component of SDL. We do not recommend you use SDL_Renderer
  4. // because it provide a rather limited API to the end-user. We provide this backend for the sake of completeness.
  5. // For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX.
  6. // Implemented features:
  7. // [X] Renderer: User texture binding. Use 'SDL_Texture*' as ImTextureID. Read the FAQ about ImTextureID!
  8. // Missing features:
  9. // [ ] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices.
  10. #pragma once
  11. #include "imgui.h" // IMGUI_IMPL_API
  12. struct SDL_Renderer;
  13. IMGUI_IMPL_API bool ImGui_ImplSDLRenderer_Init(SDL_Renderer* renderer);
  14. IMGUI_IMPL_API void ImGui_ImplSDLRenderer_Shutdown();
  15. IMGUI_IMPL_API void ImGui_ImplSDLRenderer_NewFrame();
  16. IMGUI_IMPL_API void ImGui_ImplSDLRenderer_RenderDrawData(ImDrawData* draw_data);
  17. // Called by Init/NewFrame/Shutdown
  18. IMGUI_IMPL_API bool ImGui_ImplSDLRenderer_CreateFontsTexture();
  19. IMGUI_IMPL_API void ImGui_ImplSDLRenderer_DestroyFontsTexture();
  20. IMGUI_IMPL_API bool ImGui_ImplSDLRenderer_CreateDeviceObjects();
  21. IMGUI_IMPL_API void ImGui_ImplSDLRenderer_DestroyDeviceObjects();