encompass-cs/encompass-cs/Renderers/OrderedRenderer.cs

18 lines
592 B
C#

using System;
namespace Encompass
{
/// <summary>
/// OrdereredRenderer provides a structure for the common pattern of wishing to draw a specific DrawComponent at a specific layer.
/// </summary>
public abstract class OrderedRenderer<TComponent> : Renderer where TComponent : struct, IComponent, IDrawComponent
{
public abstract void Render(Guid drawComponentID, TComponent drawComponent);
internal void InternalRender(Guid drawComponentId, IComponent component)
{
Render(drawComponentId, (TComponent)component);
}
}
}