Viewport, DPI: Now using DpiScale from the ImGuiPlatformMonitor array instead of calling Platform_GetWindowDpiScale() before the platform window creation. Might even tentatively see if things work out without Platform_GetWindowDpiScale. (#1676)
// (Optional) Represent the bounds of each connected monitor/display
// Dear ImGui only uses this to clamp the position of popups and tooltips so they don't straddle multiple monitors.
// (Optional) Represent the bounds of each connected monitor/display and their DPI
// This is used for: multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors.
structImGuiPlatformMonitor
{
ImVec2MainPos,MainSize;// Coordinates of the area displayed on this monitor (Min = upper left, Max = bottom right)
ImVec2WorkPos,WorkSize;// (Optional) Coordinates without task bars / side bars / menu bars. imgui uses this to avoid positioning popups/tooltips inside this region.
float(*Platform_GetWindowDpiScale)(ImGuiViewport*vp);// (Optional) [BETA] (FIXME-DPI) DPI handling: Return DPI scale for this viewport. 1.0f = 96 DPI. IMPORTANT: this will be called _before_ the window is created, in which case the implementation is expected to use the viewport->Pos/Size fields to estimate DPI value.
float(*Platform_GetWindowDpiScale)(ImGuiViewport*vp);// (Optional) [BETA] (FIXME-DPI) DPI handling: Return DPI scale for this viewport. 1.0f = 96 DPI.
void(*Platform_OnChangedViewport)(ImGuiViewport*vp);// (Optional) [BETA] (FIXME-DPI) DPI handling: Called during Begin() every time the viewport we are outputting into changes, so back-end has a chance to swap fonts to adjust style.
void(*Platform_SetImeInputPos)(ImGuiViewport*vp,ImVec2pos);// (Optional) Set IME (Input Method Editor, e.g. for Asian languages) input position, so text preview appears over the imgui input box.
int(*Platform_CreateVkSurface)(ImGuiViewport*vp,ImU64vk_inst,constvoid*vk_allocators,ImU64*out_vk_surface);// (Optional) For Renderer to call into Platform code