| 522 | } |
| 523 | |
| 524 | void 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 | |
| 543 | bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context) |
| 544 | { |
no test coverage detected