Fix gizmos debug draw shapes

This commit is contained in:
Wojtek Figat
2021-06-01 14:38:24 +02:00
parent accbef6841
commit c30e338f0a
4 changed files with 18 additions and 12 deletions

View File

@@ -450,6 +450,12 @@ namespace FlaxEditor.Viewport
/// <inheritdoc />
public void DrawEditorPrimitives(GPUContext context, ref RenderContext renderContext, GPUTexture target, GPUTexture targetDepth)
{
// Draw gizmos
for (int i = 0; i < Gizmos.Count; i++)
{
Gizmos[i].Draw(ref renderContext);
}
// Draw selected objects debug shapes and visuals
if (DrawDebugDraw && (renderContext.View.Flags & ViewFlags.DebugDraw) == ViewFlags.DebugDraw)
{
@@ -463,12 +469,6 @@ namespace FlaxEditor.Viewport
DebugDraw.Draw(ref renderContext, target.View(), targetDepth.View(), true);
}
// Draw gizmos
for (int i = 0; i < Gizmos.Count; i++)
{
Gizmos[i].Draw(ref renderContext);
}
}
private void OnPostRender(GPUContext context, RenderContext renderContext)

View File

@@ -865,13 +865,13 @@ namespace FlaxEditor.Viewport
/// <inheritdoc />
public override void DrawEditorPrimitives(GPUContext context, ref RenderContext renderContext, GPUTexture target, GPUTexture targetDepth)
{
base.DrawEditorPrimitives(context, ref renderContext, target, targetDepth);
// Draw gizmos
for (int i = 0; i < Gizmos.Count; i++)
{
Gizmos[i].Draw(ref renderContext);
}
base.DrawEditorPrimitives(context, ref renderContext, target, targetDepth);
}
/// <inheritdoc />