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

Method OnWindowResized

SHTest/SampleFramework12/v1.04/App.cpp:115–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void App::OnWindowResized(void* context, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
116{
117 if(msg != WM_SIZE)
118 return;
119
120 App* app = reinterpret_cast<App*>(context);
121
122 if(wParam != SIZE_MINIMIZED)
123 {
124 int width, height;
125 app->window.GetClientArea(width, height);
126
127 if(uint32(width) != app->swapChain.Width() || uint32(height) != app->swapChain.Height())
128 {
129 app->BeforeReset_Internal();
130
131 app->swapChain.SetWidth(width);
132 app->swapChain.SetHeight(height);
133 app->swapChain.Reset();
134
135 app->AfterReset_Internal();
136 }
137 }
138}
139
140void App::Exit()
141{

Callers

nothing calls this directly

Calls 8

GetClientAreaMethod · 0.80
BeforeReset_InternalMethod · 0.80
SetWidthMethod · 0.80
SetHeightMethod · 0.80
AfterReset_InternalMethod · 0.80
WidthMethod · 0.45
HeightMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected