#pragma once #import #include "shaders/program_pool.hpp" #include "drape/pointers.hpp" #include #include namespace gpu { enum class SystemProgram { ClearColor = 0, ClearDepth, ClearColorAndDepth, SystemProgramsCount }; namespace metal { class MetalProgramPool : public ProgramPool { public: explicit MetalProgramPool(id device); ~MetalProgramPool() override; drape_ptr Get(Program program) override; drape_ptr GetSystemProgram(SystemProgram program); private: drape_ptr Get(std::string const & programName, std::string const & vertexShaderName, std::string const & fragmentShaderName, std::map const & layout); id GetFunction(std::string const & name); id m_device; id m_library; std::map> m_functions; }; } // namespace metal } // namespace gpu