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

Method deviceRestore

Platforms/DirectX/DirectXPlatform/src/MyGUI_DirectXTexture.cpp:243–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241 }
242
243 void DirectXTexture::deviceRestore()
244 {
245 if (mInternalPool == D3DPOOL_DEFAULT)
246 {
247 HRESULT result = mpD3DDevice->CreateTexture(
248 mSize.width,
249 mSize.height,
250 1,
251 mInternalUsage,
252 mInternalFormat,
253 D3DPOOL_DEFAULT,
254 &mpTexture,
255 nullptr);
256 if (FAILED(result))
257 {
258 MYGUI_PLATFORM_EXCEPT("Failed to recreate texture on device restore (error code " << result << ").");
259 }
260 }
261 }
262
263} // namespace MyGUI

Callers 2

drawOneFrameMethod · 0.45
resizeRenderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected