------------------------------------------------------------------------------
| 751 | |
| 752 | //------------------------------------------------------------------------------ |
| 753 | wgpu::CommandBuffer vtkWebGPURenderer::EncodePropListRenderCommand( |
| 754 | vtkProp** propList, int listLength) |
| 755 | { |
| 756 | this->UpdateBuffers(); |
| 757 | |
| 758 | // Because all the command encoding / rendering function use the props of the this->PropArray |
| 759 | // list, we're going to replace the list so that only the props we're interested in are rendered. |
| 760 | // We need to backup the original list though to restore it afterwards |
| 761 | vtkProp** propArrayBackup = this->PropArray; |
| 762 | int propCountBackup = this->PropArrayCount; |
| 763 | |
| 764 | this->PropArray = propList; |
| 765 | this->PropArrayCount = listLength; |
| 766 | |
| 767 | this->RecordRenderCommands(); |
| 768 | |
| 769 | // Restoring |
| 770 | this->PropArray = propArrayBackup; |
| 771 | this->PropArrayCount = propCountBackup; |
| 772 | |
| 773 | vtkWebGPURenderWindow* renderWindow = |
| 774 | vtkWebGPURenderWindow::SafeDownCast(this->GetRenderWindow()); |
| 775 | wgpu::CommandEncoder commandEncoder = renderWindow->GetCommandEncoder(); |
| 776 | wgpu::CommandBuffer commandBuffer = commandEncoder.Finish(); |
| 777 | |
| 778 | // The command encoder of the render window has finished so we need to recreate a new one so that |
| 779 | // it's ready to be used again by someone else |
| 780 | renderWindow->CreateCommandEncoder(); |
| 781 | |
| 782 | this->DrawBackgroundInClearPass = false; |
| 783 | return commandBuffer; |
| 784 | } |
| 785 | |
| 786 | //------------------------------------------------------------------------------ |
| 787 | void vtkWebGPURenderer::BeginRecording() |
no test coverage detected