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

Function NativeBeginFrame

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

Source from the content-addressed store, hash-verified

94 }
95
96 void NativeBeginFrame(HContext _context)
97 {
98 VulkanContext* context = (VulkanContext*) _context;
99#if ANDROID
100 AndroidVulkanBeginFrame(context);
101#endif
102 uint32_t window_width = dmPlatform::GetWindowWidth(context->m_BaseContext.m_Window);
103 uint32_t window_height = dmPlatform::GetWindowHeight(context->m_BaseContext.m_Window);
104
105#if ANDROID
106 if (AndroidVulkanHandleWindowSurfaceChange(context, window_width, window_height))
107 {
108 return;
109 }
110#endif
111
112 if (window_width != context->m_WindowWidth || window_height != context->m_WindowHeight)
113 {
114 context->m_WindowWidth = (uint32_t) window_width;
115 context->m_WindowHeight = (uint32_t) window_height;
116
117 SwapChainChanged(context, &context->m_WindowWidth, &context->m_WindowHeight, 0, 0);
118#if ANDROID
119 SyncAndroidVulkanWindowSize(context);
120#endif
121 }
122 }
123
124 bool NativeInitializeContext(HContext _context)
125 {

Callers 1

VulkanBeginFrameFunction · 0.85

Calls 6

AndroidVulkanBeginFrameFunction · 0.85
SwapChainChangedFunction · 0.85
GetWindowWidthFunction · 0.50
GetWindowHeightFunction · 0.50

Tested by

no test coverage detected