Add Renderer::DrawActors for quick actors rendering in custom render passes

This commit is contained in:
Wojtek Figat
2023-01-30 00:52:32 +01:00
parent 238095b862
commit 9b3d15aa46
4 changed files with 52 additions and 22 deletions

View File

@@ -13,9 +13,21 @@ namespace FlaxEngine
/// <param name="task">Render task to use it's view description and the render buffers.</param>
/// <param name="output">The output texture. Must be valid and created.</param>
/// <param name="customActors">The custom set of actors to render. If empty, the loaded scenes will be rendered.</param>
[Unmanaged]
public static void DrawSceneDepth(GPUContext context, SceneRenderTask task, GPUTexture output, List<Actor> customActors)
{
Internal_DrawSceneDepth(FlaxEngine.Object.GetUnmanagedPtr(context), FlaxEngine.Object.GetUnmanagedPtr(task), FlaxEngine.Object.GetUnmanagedPtr(output), Utils.ExtractArrayFromList(customActors));
}
/// <summary>
/// Invoked drawing of the scene objects (collects draw calls into RenderList for a given RenderContext).
/// </summary>
/// <param name="renderContext">The rendering context.</param>
/// <param name="customActors">The custom set of actors to render. If empty, the loaded scenes will be rendered.</param>
[Unmanaged]
public static void DrawActors(ref RenderContext renderContext, List<Actor> customActors)
{
Internal_DrawActors(ref renderContext, Utils.ExtractArrayFromList(customActors));
}
}
}