#pragma once #include "shaders/program_pool.hpp" #include "shaders/program_params.hpp" #include "drape/drape_global.hpp" #include "drape/graphics_context.hpp" #include "drape/gpu_program.hpp" #include "drape/pointers.hpp" #include "base/macros.hpp" #include #include namespace gpu { class ProgramManager { public: ProgramManager() = default; void Init(ref_ptr context); void Destroy(ref_ptr context); ref_ptr GetProgram(Program program); ref_ptr GetParamsSetter() const; private: void InitForOpenGL(ref_ptr context); void InitForVulkan(ref_ptr context); void DestroyForVulkan(ref_ptr context); #if defined(OMIM_METAL_AVAILABLE) // Definition of this method is in a .mm-file. void InitForMetal(ref_ptr context); #endif using Programs = std::array, static_cast(Program::ProgramsCount)>; Programs m_programs; drape_ptr m_pool; drape_ptr m_paramsSetter; DISALLOW_COPY_AND_MOVE(ProgramManager); }; } // namespace gpu