using AcDream.App.Rendering;
namespace AcDream.App.Rendering.Wb;
///
/// Campaign V slice V6i-2: everything the mesh pipeline actually needs from a
/// graphics device.
///
/// Plan §5.5.10 recorded the blocker plainly: "WbMeshAdapter owns an
/// OpenGLGraphicsDevice, so it is not constructible on Vulkan" — which is
/// why a null mesh adapter had to exist at all. §5.5.12 item 6 then MEASURED how
/// wide that dependency really is, and the answer at the time was seven members:
/// a GL context, the retirement queue, the shared instance VBO, and two
/// capability flags (the two process/queue members below).
///
/// So the coupling was expressed as an interface at exactly that surface,
/// and OpenGLGraphicsDevice declared it — every member already existed,
/// so the GL arm executed not one changed statement. What this bought was that
/// ObjectMeshManager and WbMeshAdapter no longer NAME a backend,
/// which is the prerequisite for the slice that gives them a second
/// implementation.
///
/// What slice V6i-3 then moved. V6i-2 left the upload bodies raw —
/// GlobalMeshBuffer's vertex array, the arena's publication step, and the
/// per-mesh VAO/VBO/IBO construction — so the pipeline could be CONSTRUCTED off
/// GL but not RUN. The arena now builds its stores through
/// IGpuDevice.CreateBuffer and publishes them as
/// GlobalMeshBuffer.VertexStore/IndexStore, which a pass encoder
/// binds; the vertex array is built only where one exists.
/// is the
/// second implementation this interface was cut for.
///
/// Campaign V slice V11 deleted OpenGLGraphicsDevice along
/// with the rest of the raw-GL arm it fronted (and the legacy per-mesh upload
/// bodies the modern path had already made unreachable), so
/// is now
/// the interface's only implementation and its own package/shader cleanup slice
/// removed the Gl member this interface used to carry — nothing read it
/// any more once those bodies were gone.
///
internal interface IMeshPipelineDevice : IDisposable
{
/// Frame-flight-gated release for everything the pipeline allocates.
IGpuResourceRetirementQueue ResourceRetirement { get; }
/// The shared per-instance attribute buffer the legacy draw path binds.
uint InstanceVBO { get; }
/// GL_ARB_bindless_texture. Half of the modern-path gate.
bool HasBindless { get; }
/// GL 4.3 or better. The other half of the modern-path gate.
bool HasOpenGL43 { get; }
/// True while deferred device work is still queued.
bool HasPendingWork { get; }
/// Runs deferred device work. Called once per frame from the render thread.
void ProcessQueue();
}