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

Function CreateContextFactory

dev_sandbox/main_linux.cpp:372–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370};
371
372drape_ptr<dp::GraphicsContextFactory> CreateContextFactory(GLFWwindow * window, dp::ApiVersion api, m2::PointU size)
373{
374 if (api == dp::ApiVersion::Vulkan)
375 {
376 auto contextFactory = make_unique_dp<LinuxVulkanContextFactory>();
377 contextFactory->SetSurface(glfwGetX11Display(), glfwGetX11Window(window));
378 return contextFactory;
379 }
380
381 if (api == dp::ApiVersion::OpenGLES3)
382 return make_unique_dp<LinuxContextFactory>(glfwGetX11Display(), glfwGetX11Window(window));
383
384 ASSERT(false, ("API is not available yet"));
385 return nullptr;
386}
387
388void OnCreateDrapeEngine(GLFWwindow * window, dp::ApiVersion api, ref_ptr<dp::GraphicsContextFactory> contextFactory)
389{

Callers 1

mainFunction · 0.85

Calls 2

ASSERTFunction · 0.85
SetSurfaceMethod · 0.45

Tested by

no test coverage detected