Add CPU profiler events for UI drawing

This commit is contained in:
Wojtek Figat
2024-03-30 22:20:41 +01:00
parent e1944bce96
commit 294b4c4006

View File

@@ -73,6 +73,7 @@ namespace FlaxEngine
if (renderContext.View.Frustum.Contains(bounds.GetBoundingBox()) == ContainmentType.Disjoint)
return;
Profiler.BeginEvent("UI Canvas");
Profiler.BeginEventGPU("UI Canvas");
// Calculate rendering matrix (world*view*projection)
@@ -90,6 +91,7 @@ namespace FlaxEngine
Render2D.CallDrawing(Canvas.GUI, context, input, depthBuffer, ref viewProjectionMatrix);
Render2D.Features = features;
Profiler.EndEvent();
Profiler.EndEventGPU();
}
}