MCPcopy Create free account
hub / github.com/comaps/comaps / Init

Method Init

libs/shaders/program_manager.cpp:19–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace gpu
18{
19void ProgramManager::Init(ref_ptr<dp::GraphicsContext> context)
20{
21 CHECK_THREAD_CHECKER(m_threadChecker, ());
22 auto const apiVersion = context->GetApiVersion();
23 if (apiVersion == dp::ApiVersion::OpenGLES3)
24 {
25 InitForOpenGL(context);
26 }
27 else if (apiVersion == dp::ApiVersion::Metal)
28 {
29#if defined(OMIM_METAL_AVAILABLE)
30 InitForMetal(context);
31#endif
32 }
33 else if (apiVersion == dp::ApiVersion::Vulkan)
34 {
35 InitForVulkan(context);
36 }
37 else
38 {
39 CHECK(false, ("Unsupported API version."));
40 }
41}
42
43void ProgramManager::Destroy(ref_ptr<dp::GraphicsContext> context)
44{

Callers

nothing calls this directly

Calls 1

GetApiVersionMethod · 0.45

Tested by

no test coverage detected