------------------------------------------------------------------------------
| 3669 | |
| 3670 | //------------------------------------------------------------------------------ |
| 3671 | void vtkWebGPUPolyDataMapper::ReleaseGraphicsResources(vtkWindow* w) |
| 3672 | { |
| 3673 | this->Superclass::ReleaseGraphicsResources(w); |
| 3674 | |
| 3675 | // Release mesh buffers, bind groups and reset the attribute build timestamps. |
| 3676 | for (int attributeIndex = 0; attributeIndex < CELL_NB_ATTRIBUTES; ++attributeIndex) |
| 3677 | { |
| 3678 | this->CellBuffers[attributeIndex] = {}; |
| 3679 | this->CellAttributesBuildTimestamp[attributeIndex] = vtkTimeStamp(); |
| 3680 | } |
| 3681 | for (int attributeIndex = 0; attributeIndex < POINT_NB_ATTRIBUTES; ++attributeIndex) |
| 3682 | { |
| 3683 | this->PointBuffers[attributeIndex] = {}; |
| 3684 | this->PointAttributesBuildTimestamp[attributeIndex] = vtkTimeStamp(); |
| 3685 | } |
| 3686 | if (this->ClippingPlanesBuffer) |
| 3687 | { |
| 3688 | this->ClippingPlanesBuffer.Destroy(); |
| 3689 | this->ClippingPlanesBuffer = nullptr; |
| 3690 | } |
| 3691 | if (this->ColorTextureHostResource != nullptr) |
| 3692 | { |
| 3693 | this->ColorTextureHostResource->ReleaseGraphicsResources(w); |
| 3694 | this->ColorTextureHostResource = nullptr; |
| 3695 | } |
| 3696 | this->ClippingPlanesBuildTimestamp = vtkTimeStamp(); |
| 3697 | this->LastScalarMode = -1; |
| 3698 | this->LastScalarVisibility = false; |
| 3699 | this->MeshAttributeBindGroup = nullptr; |
| 3700 | |
| 3701 | // Release topology conversion pipelines and reset their build timestamps. |
| 3702 | for (int i = 0; i < vtkWebGPUCellToPrimitiveConverter::NUM_TOPOLOGY_SOURCE_TYPES; ++i) |
| 3703 | { |
| 3704 | this->TopologyBindGroupInfos[i] = TopologyBindGroupInfo{}; |
| 3705 | this->IndirectDrawBufferUploadTimeStamp[i] = vtkTimeStamp(); |
| 3706 | } |
| 3707 | this->CellConverter->ReleaseGraphicsResources(w); |
| 3708 | this->RebuildGraphicsPipelines = true; |
| 3709 | this->LastNumClipPlanes = VTK_TYPE_UINT32_MAX; |
| 3710 | for (auto& it : this->CachedActorRendererProperties) |
| 3711 | { |
| 3712 | if (auto* wgpuRenderer = vtkWebGPURenderer::SafeDownCast(it.first.second)) |
| 3713 | { |
| 3714 | wgpuRenderer->InvalidateBundle(); |
| 3715 | } |
| 3716 | } |
| 3717 | this->CachedActorRendererProperties.clear(); |
| 3718 | } |
| 3719 | |
| 3720 | //------------------------------------------------------------------------------ |
| 3721 | void vtkWebGPUPolyDataMapper::MapDataArrayToVertexAttribute(const char*, const char*, int, int) {} |
no test coverage detected