blob: e3209e6b44971c59a3349badd6fa70684eae9b02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#pragma once
#include "shaders/program_pool.hpp"
#include "shaders/program_params.hpp"
#include "drape/drape_global.hpp"
#include "drape/gpu_program.hpp"
#include "drape/pointers.hpp"
#include "base/macros.hpp"
#include <array>
#include <string>
namespace gpu
{
class ProgramManager
{
public:
ProgramManager() = default;
void Init(dp::ApiVersion apiVersion);
ref_ptr<dp::GpuProgram> GetProgram(Program program);
ref_ptr<ProgramParamsSetter> GetParamsSetter() const;
private:
using Programs = std::array<drape_ptr<dp::GpuProgram>,
static_cast<size_t>(Program::ProgramsCount)>;
Programs m_programs;
drape_ptr<ProgramPool> m_pool;
drape_ptr<ProgramParamsSetter> m_paramsSetter;
DISALLOW_COPY_AND_MOVE(ProgramManager);
};
} // namespace gpu
|