MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / ImGui_ImplDX11_InvalidateDeviceObjects

Function ImGui_ImplDX11_InvalidateDeviceObjects

KBotExt/imgui/imgui_impl_dx11.cpp:524–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522}
523
524void ImGui_ImplDX11_InvalidateDeviceObjects()
525{
526 ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
527 if (!bd->pd3dDevice)
528 return;
529
530 if (bd->pFontSampler) { bd->pFontSampler->Release(); bd->pFontSampler = nullptr; }
531 if (bd->pFontTextureView) { bd->pFontTextureView->Release(); bd->pFontTextureView = nullptr; ImGui::GetIO().Fonts->SetTexID(0); } // We copied data->pFontTextureView to io.Fonts->TexID so let's clear that as well.
532 if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
533 if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
534 if (bd->pBlendState) { bd->pBlendState->Release(); bd->pBlendState = nullptr; }
535 if (bd->pDepthStencilState) { bd->pDepthStencilState->Release(); bd->pDepthStencilState = nullptr; }
536 if (bd->pRasterizerState) { bd->pRasterizerState->Release(); bd->pRasterizerState = nullptr; }
537 if (bd->pPixelShader) { bd->pPixelShader->Release(); bd->pPixelShader = nullptr; }
538 if (bd->pVertexConstantBuffer) { bd->pVertexConstantBuffer->Release(); bd->pVertexConstantBuffer = nullptr; }
539 if (bd->pInputLayout) { bd->pInputLayout->Release(); bd->pInputLayout = nullptr; }
540 if (bd->pVertexShader) { bd->pVertexShader->Release(); bd->pVertexShader = nullptr; }
541}
542
543bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context)
544{

Callers 2

ImGui_ImplDX11_ShutdownFunction · 0.85

Calls 2

SetTexIDMethod · 0.80

Tested by

no test coverage detected