MCPcopy Create free account
hub / github.com/carbonengine/trinity / UpdateLiveCount

Method UpdateLiveCount

trinity/Particle/Tr2GpuParticleSystem.cpp:381–390  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Updates number of live/visible particles for debugging. --------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

379// Updates number of live/visible particles for debugging.
380// --------------------------------------------------------------------------------------
381void Tr2GpuParticleSystem::UpdateLiveCount( Tr2RenderContext& renderContext )
382{
383 if( m_updateVisibleCount )
384 {
385 const uint32_t* count = nullptr;
386 CR_RETURN( m_drawParameters->GetGpuBuffer( 0 )->MapForReading( count, renderContext ) );
387 m_visibleCount = *count / 6;
388 m_drawParameters->GetGpuBuffer( 0 )->UnmapForReading( renderContext );
389 }
390}
391
392// --------------------------------------------------------------------------------------
393// Description:

Callers

nothing calls this directly

Calls 3

MapForReadingMethod · 0.45
GetGpuBufferMethod · 0.45
UnmapForReadingMethod · 0.45

Tested by

no test coverage detected