-------------------------------------------------------------------------------------- Description: Removes all particles from the system. --------------------------------------------------------------------------------------
| 394 | // Removes all particles from the system. |
| 395 | // -------------------------------------------------------------------------------------- |
| 396 | bool Tr2GpuParticleSystem::DoClear( Tr2RenderContext& renderContext ) |
| 397 | { |
| 398 | m_liveTime = 0; |
| 399 | uint32_t zeroes[] = { 0, 0, 0, 0 }; |
| 400 | renderContext.ClearUav( *m_counters->GetGpuBuffer( 0 ), zeroes ); |
| 401 | |
| 402 | uint32_t perObjectData[4] = { m_particleData->GetCount(), 0, 0, 0 }; |
| 403 | FillAndSetConstants( m_updateCB, perObjectData, sizeof( perObjectData ), Tr2RenderContextEnum::COMPUTE_SHADER, Tr2Renderer::GetPerObjectVSStartRegister(), renderContext ); |
| 404 | return Tr2Renderer::RunComputeShader( m_clear, 1, 1, 1, renderContext ); |
| 405 | } |
| 406 | |
| 407 | // -------------------------------------------------------------------------------------- |
| 408 | // Description: |
nothing calls this directly
no test coverage detected