forked from Misaki/GhostEngine
Added `InternalsVisibleTo` attribute for "Ghost.Graphics" and "Ghost.Editor" in `AssemblyInfo.cs`. Added a new `EngineAssemblyAttribute` in `EngineAssemblyAttribute.cs`. Added a reference to `Misaki.HighPerformance.Unsafe` in `Ghost.Core.csproj`. Added a new `Bounds` struct to represent axis-aligned bounding boxes in `Bounds.cs`. Added new `Color32` and `Color128` structs for color representation in `Color.cs`. Changed the namespace from `Ghost.Editor.Controls` to `Ghost.Editor.Core.Controls` in multiple files. Changed the implicit conversion operator in `ConstPtr<T>` to use a more descriptive parameter name in `ConstPtr.cs`. Changed the `Mesh` class to use `Color128` instead of `Color32` for color representation. Enhanced the `TypeCache` class to load types from assemblies marked with `EngineAssemblyAttribute`. Enhanced the `ProjectService` class to improve the `GetAllProjectAsync` method by filtering out bad projects. Enhanced the `GraphicsPipeline` class to support both DX12 and D3D12 graphics APIs. Enhanced the `Shader` class to include methods for compiling HLSL shaders and managing root signatures. Enhanced the `MeshRenderPass` class to utilize the new shader compilation methods. Refactored the `AppStateMachine` class to use private fields instead of static fields for state management. Refactored the `ComponentDataView` class to use the new namespace and improve organization. Refactored project references in `Ghost.Graphics.csproj` to include new dependencies and remove outdated ones. Made various adjustments to ensure consistency and improve code quality across multiple files.
39 lines
1.3 KiB
C#
39 lines
1.3 KiB
C#
namespace Ghost.Graphics.Contracts;
|
|
|
|
/// <summary>
|
|
/// Defines the contract for a render view in the graphics pipeline.
|
|
/// </summary>
|
|
internal interface IRenderer : IDisposable
|
|
{
|
|
public ReadOnlySpan<IRenderPass> RenderPasses
|
|
{
|
|
get;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Requests a resize of the render view.
|
|
/// </summary>
|
|
/// <param name="width">The new width of the render view.</param>
|
|
/// <param name="height">The new height of the render view.</param>
|
|
/// <remarks>This only submits a resize request without executing it. May overwrite last request if next request issued before next frame.</remarks>
|
|
public void RequestResize(uint width, uint height);
|
|
/// <summary>
|
|
/// Executes any pending resize operations for the current context.
|
|
/// </summary>
|
|
public void ExecutePendingResize();
|
|
|
|
public void Initialize();
|
|
/// <summary>
|
|
/// Renders the current content to the output target.
|
|
/// </summary>
|
|
public void Render();
|
|
|
|
/// <summary>
|
|
/// Waits for the next frame to be ready for rendering.
|
|
/// </summary>
|
|
public void WaitNextFrame();
|
|
/// <summary>
|
|
/// Waits for the render view to become idle, ensuring all previous commands have been executed and resources are ready for the next frame.
|
|
/// </summary>
|
|
public void WaitIdle();
|
|
} |