| 97 | } |
| 98 | |
| 99 | void App::OnWindowResized(void* context, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
| 100 | { |
| 101 | if(msg != WM_SIZE) |
| 102 | return; |
| 103 | |
| 104 | App* app = reinterpret_cast<App*>(context); |
| 105 | |
| 106 | if(!app->swapChain.FullScreen() && wParam != SIZE_MINIMIZED) |
| 107 | { |
| 108 | int width, height; |
| 109 | app->window.GetClientArea(width, height); |
| 110 | |
| 111 | if(uint32(width) != app->swapChain.Width() || uint32(height) != app->swapChain.Height()) |
| 112 | { |
| 113 | app->DestroyPSOs_Internal(); |
| 114 | |
| 115 | app->BeforeReset_Internal(); |
| 116 | |
| 117 | app->swapChain.SetWidth(width); |
| 118 | app->swapChain.SetHeight(height); |
| 119 | app->swapChain.Reset(); |
| 120 | |
| 121 | app->AfterReset_Internal(); |
| 122 | |
| 123 | app->CreatePSOs_Internal(); |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | void App::Exit() |
| 129 | { |
nothing calls this directly
no test coverage detected