MCPcopy Create free account
hub / github.com/PolygonTek/BlueshiftEngine / ShutdownInstance

Function ShutdownInstance

Source/TestRenderer/WinMain.cpp:250–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250void ShutdownInstance() {
251 app.FreeResources();
252
253#ifdef CREATE_SUB_WINDOW
254 if (subContext) {
255 BE1::rhi.DestroyRenderTarget(subRenderTarget);
256
257 HWND hwnd = (HWND)BE1::rhi.GetWindowHandleFromContext(subContext);
258 BE1::rhi.DestroyContext(subContext);
259
260 ::DestroyWindow(hwnd);
261 }
262#endif
263
264 if (mainContext) {
265 BE1::rhi.DestroyRenderTarget(mainRenderTarget);
266
267 HWND hwnd = (HWND)BE1::rhi.GetWindowHandleFromContext(mainContext);
268 BE1::rhi.DestroyContext(mainContext);
269
270 ::DestroyWindow(hwnd);
271 }
272
273 app.Shutdown();
274
275 BE1::Engine::ShutdownBase();
276}
277
278int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) {
279 UNREFERENCED_PARAMETER(hPrevInstance);

Callers 1

_tWinMainFunction · 0.70

Calls 5

FreeResourcesMethod · 0.80
DestroyRenderTargetMethod · 0.80
DestroyContextMethod · 0.45
ShutdownMethod · 0.45

Tested by

no test coverage detected