BVB Source Codes

CRYENGINE Show ParticleProfilerImpl.h Source code

Return Download CRYENGINE: download ParticleProfilerImpl.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. namespace pfx2
  4. {
  5.  
  6. #if !defined(_RELEASE)
  7.  
  8. ILINE void CParticleProfiler::AddEntry(CParticleComponentRuntime* pRuntime, EProfileStat type, uint value)
  9. {
  10.         const uint32 threadId = JobManager::GetWorkerThreadId();
  11.         SEntry entry;
  12.         entry.m_pRuntime = pRuntime;
  13.         entry.m_type = type;
  14.         entry.m_value = value;
  15.         m_entries[threadId + 1].push_back(entry);
  16. }
  17.  
  18. ILINE CTimeProfiler::CTimeProfiler(CParticleProfiler& profiler, CParticleComponentRuntime* pRuntime, EProfileStat stat)
  19.         : m_profiler(profiler)
  20.         , m_pRuntime(pRuntime)
  21.         , m_stat(stat)
  22.         , m_startTicks(CryGetTicks())
  23. {
  24. }
  25.  
  26. ILINE CTimeProfiler::~CTimeProfiler()
  27. {
  28.         const int64 endTicks = CryGetTicks();
  29.         const uint time = uint(gEnv->pTimer->TicksToSeconds(endTicks - m_startTicks) * 1000000.0f);
  30.         m_profiler.AddEntry(m_pRuntime, m_stat, time);
  31.         m_profiler.AddEntry(m_pRuntime, EPS_TotalTiming, time);
  32. }
  33.  
  34. #else
  35.  
  36. ILINE void CParticleProfiler::AddEntry(CParticleComponentRuntime* pRuntime, EProfileStat type, uint value)  {}
  37. ILINE CTimeProfiler::CTimeProfiler(CParticleProfiler& profiler, CParticleComponentRuntime* pRuntime, EProfileStat stat) : m_profiler(profiler) {}
  38. ILINE CTimeProfiler::~CTimeProfiler() {}
  39.  
  40. #endif
  41.  
  42. }
  43.  
downloadParticleProfilerImpl.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top