1 // Copyright 2001-2018 Crytek GmbH / Crytek Group. All rights reserved.
4 #include "CryProfilingSystemSharedImpl.h"
5 #include <CryCore/CryCrc32.h>
7 CCryProfilingSystemImpl::CCryProfilingSystemImpl()
10 bool CCryProfilingSystemImpl::OnInputEvent(const SInputEvent
& event
)
12 if (event
.deviceType
== eIDT_Keyboard
&& event
.keyId
== eKI_ScrollLock
)
14 if (event
.state
== eIS_Pressed
)
16 PauseRecording(!IsPaused());
22 void CCryProfilingSystemImpl::OnSliceAndSleep()
28 const char* CCryProfilingSystemImpl::GetModuleName(EProfiledSubsystem subSystem
) const
32 case PROFILE_RENDERER
:
34 case PROFILE_3DENGINE
:
36 case PROFILE_PARTICLE
:
40 case PROFILE_ANIMATION
:
54 case PROFILE_SCRIPT_CFUNC
:
55 return "Script_CFunc";
68 case PROFILE_LOADING_ONLY
:
72 return "<Unknown Id>";
76 const char* CCryProfilingSystemImpl::GetModuleName(const SProfilingSection
* pSection
) const
78 return GetModuleName(pSection
->pDescription
->subsystem
);
81 uint32
CCryProfilingSystemImpl::GenerateColorBasedOnName(const char* name
)
83 uint32 hash
= CCrc32::Compute(name
);
84 hash
|= 0xFF000000; // force alpha to opaque