MCPcopy Create free account
hub / github.com/defold/defold / NativeInitializeContext

Function NativeInitializeContext

engine/graphics/src/vulkan/graphics_native.cpp:124–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 }
123
124 bool NativeInitializeContext(HContext _context)
125 {
126 VulkanContext* context = (VulkanContext*) _context;
127 assert(context->m_WindowSurface == VK_NULL_HANDLE);
128
129 if (!InitializeVulkan(_context))
130 {
131 return false;
132 }
133
134 context->m_WindowWidth = context->m_SwapChain->m_ImageExtent.width;
135 context->m_WindowHeight = context->m_SwapChain->m_ImageExtent.height;
136 context->m_CurrentRenderTarget = context->m_MainRenderTarget;
137
138#if ANDROID
139 AndroidVulkanInitializeContext(context);
140#endif
141
142 return true;
143 }
144
145 void VulkanCloseWindow(HContext _context)
146 {

Callers 1

VulkanNewContextFunction · 0.85

Calls 3

InitializeVulkanFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected