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

Function PrepareDestroyContextFactory

dev_sandbox/main_linux.cpp:393–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393void PrepareDestroyContextFactory(ref_ptr<dp::GraphicsContextFactory> contextFactory)
394{
395 auto const api = contextFactory->GetDrawContext()->GetApiVersion();
396 if (api == dp::ApiVersion::OpenGLES3)
397 {
398 // Do nothing
399 }
400 else if (api == dp::ApiVersion::Vulkan)
401 {
402 ref_ptr<LinuxVulkanContextFactory> linuxContextFactory = contextFactory;
403 linuxContextFactory->ResetSurface();
404 }
405 else
406 {
407 ASSERT(false, ("API is not available yet"));
408 }
409}
410
411void UpdateContentScale(GLFWwindow * window, float scale)
412{

Callers 1

mainFunction · 0.85

Calls 4

ASSERTFunction · 0.85
GetApiVersionMethod · 0.45
GetDrawContextMethod · 0.45
ResetSurfaceMethod · 0.45

Tested by

no test coverage detected