27 lines
1 KiB
C#
27 lines
1 KiB
C#
namespace AcDream.App.Rendering.Wb;
|
|
|
|
/// <summary>
|
|
/// Mockable interface over <see cref="WbMeshAdapter"/> so adapters that
|
|
/// drive ref-count lifecycle (e.g. LandblockSpawnAdapter, EntitySpawnAdapter)
|
|
/// can be unit-tested without a real WB pipeline behind them.
|
|
/// </summary>
|
|
public interface IWbMeshAdapter
|
|
{
|
|
void IncrementRefCount(ulong id);
|
|
void DecrementRefCount(ulong id);
|
|
|
|
/// <summary>
|
|
/// Pins render data whose CPU preparation is owned by a specialized
|
|
/// pipeline (for example synthetic EnvCell geometry). Unlike ordinary
|
|
/// registration, production implementations must not start a generic
|
|
/// GfxObj decode for this id.
|
|
/// </summary>
|
|
void PinPreparedRenderData(ulong id) => IncrementRefCount(id);
|
|
|
|
/// <summary>
|
|
/// True once the mesh has crossed the render-thread upload barrier and is
|
|
/// available to draw. The default keeps lifecycle-only test doubles
|
|
/// source-compatible; production adapters override it.
|
|
/// </summary>
|
|
bool IsRenderDataReady(ulong id) => true;
|
|
}
|