protected override void OnUpdate() { if (!windowOpen) { return; } var displayInfo = GetSingleton <DisplayInfo>(); GLFWNativeCalls.getWindowSize(out int winw, out int winh); if (winw != displayInfo.width || winh != displayInfo.height) { if (displayInfo.autoSizeToFrame) { displayInfo.width = winw; displayInfo.height = winh; displayInfo.frameWidth = winw; displayInfo.frameHeight = winh; displayInfo.framebufferWidth = winw; displayInfo.framebufferHeight = winh; SetSingleton(displayInfo); } else { GLFWNativeCalls.resize(displayInfo.width, displayInfo.height); } } if (GLFWNativeCalls.getWindowShouldClose() == 1) { World.QuitUpdate = true; return; } }