using System;
namespace Encompass
{
///
/// OrdereredRenderer provides a structure for the common pattern of wishing to draw a specific DrawComponent at a specific layer.
///
public abstract class OrderedRenderer : Renderer where TComponent : struct, IComponent, IDrawableComponent
{
public abstract void Render(Entity entity, in TComponent drawComponent);
internal void InternalRender(Entity entity)
{
ref readonly var component = ref GetComponent(entity);
Render(entity, component);
}
}
}