MCPcopy Create free account
hub / github.com/MyGUI/mygui / resizeRender

Method resizeRender

Common/Base/DirectX/BaseManager.cpp:122–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120 }
121
122 void BaseManager::resizeRender(int _width, int _height)
123 {
124 if (mDevice != nullptr)
125 {
126 if (mPlatform != nullptr)
127 mPlatform->getRenderManagerPtr()->deviceLost();
128
129 mD3dpp.BackBufferWidth = _width;
130 mD3dpp.BackBufferHeight = _height;
131 HRESULT hr = mDevice->Reset(&mD3dpp);
132
133 if (hr == D3DERR_INVALIDCALL)
134 {
135 MessageBox(
136 nullptr,
137 "Call to Reset() failed with D3DERR_INVALIDCALL! ",
138 "ERROR",
139 MB_OK | MB_ICONEXCLAMATION);
140 }
141
142 if (mPlatform != nullptr)
143 mPlatform->getRenderManagerPtr()->deviceRestore();
144 }
145 }
146
147 void BaseManager::addResourceLocation(const std::string& _name, bool _recursive)
148 {

Callers

nothing calls this directly

Calls 3

deviceLostMethod · 0.45
getRenderManagerPtrMethod · 0.45
deviceRestoreMethod · 0.45

Tested by

no test coverage detected