imgui_impl_sdlrenderer.h 1.5 KB

12345678910111213141516171819202122232425262728293031
  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.
  4. // For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX.
  5. // If your application will want to render any non trivial amount of graphics other than UI,
  6. // please be aware that SDL_Renderer offers a limited graphic API to the end-user and it might
  7. // be difficult to step out of those boundaries.
  8. // However, we understand it is a convenient choice to get an app started easily.
  9. // Implemented features:
  10. // [X] Renderer: User texture binding. Use 'SDL_Texture*' as ImTextureID. Read the FAQ about ImTextureID!
  11. // [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
  12. // Missing features:
  13. // [ ] Renderer: Multi-viewport support (multiple windows).
  14. #pragma once
  15. #include "imgui.h" // IMGUI_IMPL_API
  16. struct SDL_Renderer;
  17. IMGUI_IMPL_API bool ImGui_ImplSDLRenderer_Init(SDL_Renderer* renderer);
  18. IMGUI_IMPL_API void ImGui_ImplSDLRenderer_Shutdown();
  19. IMGUI_IMPL_API void ImGui_ImplSDLRenderer_NewFrame();
  20. IMGUI_IMPL_API void ImGui_ImplSDLRenderer_RenderDrawData(ImDrawData* draw_data);
  21. // Called by Init/NewFrame/Shutdown
  22. IMGUI_IMPL_API bool ImGui_ImplSDLRenderer_CreateFontsTexture();
  23. IMGUI_IMPL_API void ImGui_ImplSDLRenderer_DestroyFontsTexture();
  24. IMGUI_IMPL_API bool ImGui_ImplSDLRenderer_CreateDeviceObjects();
  25. IMGUI_IMPL_API void ImGui_ImplSDLRenderer_DestroyDeviceObjects();