MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / OnWindowResized

Method OnWindowResized

SampleFramework12/v1.00/App.cpp:99–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void 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
128void App::Exit()
129{

Callers

nothing calls this directly

Calls 11

FullScreenMethod · 0.80
GetClientAreaMethod · 0.80
DestroyPSOs_InternalMethod · 0.80
BeforeReset_InternalMethod · 0.80
SetWidthMethod · 0.80
SetHeightMethod · 0.80
AfterReset_InternalMethod · 0.80
CreatePSOs_InternalMethod · 0.80
WidthMethod · 0.45
HeightMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected