| 57 | } |
| 58 | |
| 59 | void ProgramManager::InitForOpenGL(ref_ptr<dp::GraphicsContext> context) |
| 60 | { |
| 61 | std::string globalDefines; |
| 62 | |
| 63 | // This feature is not supported on some Android devices (especially on Android 4.x version). |
| 64 | // Since we can't predict on which devices it'll work fine, we have to turn off for all devices. |
| 65 | #if !defined(OMIM_OS_ANDROID) |
| 66 | if (GLFunctions::glGetInteger(gl_const::GLMaxVertexTextures) > 0) |
| 67 | { |
| 68 | LOG(LINFO, ("VTF enabled")); |
| 69 | globalDefines.append("#define ENABLE_VTF\n"); // VTF == Vertex Texture Fetch |
| 70 | } |
| 71 | #endif |
| 72 | |
| 73 | auto const apiVersion = context->GetApiVersion(); |
| 74 | m_pool = make_unique_dp<GLProgramPool>(apiVersion); |
| 75 | ref_ptr<GLProgramPool> pool = make_ref(m_pool); |
| 76 | pool->SetDefines(globalDefines); |
| 77 | |
| 78 | m_paramsSetter = make_unique_dp<GLProgramParamsSetter>(); |
| 79 | } |
| 80 | |
| 81 | void ProgramManager::InitForVulkan(ref_ptr<dp::GraphicsContext> context) |
| 82 | { |
nothing calls this directly
no test coverage detected