MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnDraw

Method OnDraw

Source/Engine/Profiler/ProfilerGPU.cpp:290–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290void GraphicsDumping::OnDraw()
291{
292 PROFILE_MEM(Profiler);
293
294 // Process only frames in the profiling range that have data
295 for (auto& frame : ProfilerGPU::Buffers)
296 {
297 if (frame.FrameIndex == NextFrame && frame.HasData())
298 {
299 // Extract events from the frame
300 FrameData.Clear();
301 frame.Extract(FrameData);
302
303 // Put events into the current items hierarchy
304 Add(FrameData);
305
306 // Move to the next frame
307 NextFrame++;
308 FramesLeft--;
309 if (FramesLeft == 0)
310 {
311 // Done!
312 Print();
313 Delete(Dumping);
314 Dumping = nullptr;
315 return;
316 }
317 }
318 }
319}
320
321void GraphicsDumping::Add(Array<ProfilerGPU::Event>& events)
322{

Callers

nothing calls this directly

Calls 5

DeleteFunction · 0.85
AddFunction · 0.50
HasDataMethod · 0.45
ClearMethod · 0.45
ExtractMethod · 0.45

Tested by

no test coverage detected