Merge remote-tracking branch 'origin/master' into 1.7

This commit is contained in:
Wojtek Figat
2023-07-18 11:47:39 +02:00
19 changed files with 340 additions and 47 deletions

View File

@@ -17,10 +17,13 @@ namespace FlaxEngine
[Unmanaged]
public static void DrawSceneDepth(GPUContext context, SceneRenderTask task, GPUTexture output, List<Actor> customActors)
{
if (customActors.Count == 0)
return;
var temp = CollectionsMarshal.AsSpan(customActors).ToArray(); // FIXME
var tempCount = temp.Length;
Actor[] temp = null;
int tempCount = 0;
if (customActors != null && customActors.Count != 0)
{
temp = CollectionsMarshal.AsSpan(customActors).ToArray(); // FIXME
tempCount = temp.Length;
}
Internal_DrawSceneDepth(FlaxEngine.Object.GetUnmanagedPtr(context), FlaxEngine.Object.GetUnmanagedPtr(task), FlaxEngine.Object.GetUnmanagedPtr(output), temp, ref tempCount);
}
@@ -32,7 +35,14 @@ namespace FlaxEngine
[Unmanaged]
public static void DrawActors(ref RenderContext renderContext, List<Actor> customActors)
{
DrawActors(ref renderContext, Utils.ExtractArrayFromList(customActors));
Actor[] temp = null;
int tempCount = 0;
if (customActors != null && customActors.Count != 0)
{
temp = CollectionsMarshal.AsSpan(customActors).ToArray(); // FIXME
tempCount = temp.Length;
}
Internal_DrawActors(ref renderContext, temp, ref tempCount);
}
}
}