SpiecsEngine
 
Loading...
Searching...
No Matches

◆ SelectSamplingFrequency()

uint32_t Spices::NsightPerfGPUProfilerHUD::SelectSamplingFrequency ( ) const
private

Select a SamplingFrequency (Hz) by ImGui::IO.

Returns
Returns SamplingFrequency.

Stable set 60Hz if ImGui is still not initialzied yet.

Determaine frequency by ImGui framerate.

Stable set 60Hz if ImGui is still not initialzied yet.

Determaine frequency by ImGui framerate.

Definition at line 251 of file NsightPerfGPUProfilerHUD.cpp.

252 {
254
259 {
260 return 60;
261 }
262
266 const ImGuiIO& io = ImGui::GetIO();
267 if (io.Framerate >= 60.0f)
268 {
269 return 60;
270 }
271 else if(io.Framerate >= 30.0f)
272 {
273 return 120;
274 }
275 else if (io.Framerate >= 10.0f)
276 {
277 return 160;
278 }
279 else
280 {
281 return 200;
282 }
283 }
#define SPICES_PROFILE_ZONE
bool m_IsHUDInitialized
True id HUD is initialized.

References m_IsHUDInitialized.

Referenced by Create().