UiManager.cpp 795 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright (C) 2009-2022, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include <AnKi/Ui/UiManager.h>
  6. namespace anki {
  7. thread_local ImGuiContext* g_imguiTlsCtx = nullptr;
  8. UiManager::UiManager()
  9. {
  10. }
  11. UiManager::~UiManager()
  12. {
  13. }
  14. Error UiManager::init(AllocAlignedCallback allocCallback, void* allocCallbackUserData, ResourceManager* resources,
  15. GrManager* gr, StagingGpuMemoryPool* gpuMem, Input* input)
  16. {
  17. ANKI_ASSERT(resources);
  18. ANKI_ASSERT(gr);
  19. ANKI_ASSERT(gpuMem);
  20. ANKI_ASSERT(input);
  21. m_alloc = UiAllocator(allocCallback, allocCallbackUserData);
  22. m_resources = resources;
  23. m_gr = gr;
  24. m_gpuMem = gpuMem;
  25. m_input = input;
  26. return Error::NONE;
  27. }
  28. } // end namespace anki