chore(render): delete dead ParticleBatcher chain (2026-07-24 audit review)
ParticleBatcher/ParticleEmitterRenderer/ActiveParticleEmitter (src/AcDream.App/Rendering/Wb/) are an earlier WorldBuilder-derived particle-preview design with zero live call sites: ParticleBatcher.Begin/AddParticle/Flush/End are only called from ParticleEmitterRenderer.Render, which is only called from ActiveParticleEmitter.Render, and `new ActiveParticleEmitter` has zero call sites anywhere in the repo (verified by grep across src/tests/tools). The only wiring was OpenGLGraphicsDevice.ParticleBatcher (property + null-init + Dispose) and a single assignment in WbMeshAdapter.cs. ParticleBatcher's constructor unconditionally allocated a ParticleInstance[65536] managed array (~3.5 MiB) plus a matching GPU instance buffer, a shader, a VAO, and 3 more GL buffers, none tracked by GpuMemoryTracker or ever drawn from. ParticleEmitterRenderer's per-particle-type physics (Particle::Init vector-space resolution, CalculatePosition integration) duplicates, without retail address citations, what src/AcDream.Core/Vfx/ParticleSystem.cs already implements with Particle::Init (0x0051c930) / Particle::Update (0x0051c290) citations and the same ParticleType switch — the production path (ParticleSystem.cs + AcDream.App/Rendering/ParticleRenderer.cs) supersedes it. No unique retail knowledge is lost. EmbeddedResourceReader.cs and the wb_particle.vert/frag shader sources are deleted alongside it: EmbeddedResourceReader's own doc comment says it exists solely so ParticleBatcher/ParticleEmitterRenderer can load WB-style shader resource names, and GetEmbeddedResource had no other caller in the repo. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 4afedafd085a5fadd1867418d3ec71610d9d15a7)
This commit is contained in:
parent
cf25330458
commit
a4b1214e0f
8 changed files with 0 additions and 906 deletions
|
|
@ -82,8 +82,6 @@ namespace AcDream.App.Rendering.Wb {
|
|||
public uint SharedDebugVAO { get; private set; }
|
||||
public uint SharedDebugInstanceVBO { get; private set; }
|
||||
|
||||
public ParticleBatcher ParticleBatcher { get; internal set; } = null!;
|
||||
|
||||
/// <summary>OpenGL sampler object with TextureWrapMode.Repeat (for meshes with wrapping UVs).</summary>
|
||||
public uint WrapSampler { get; private set; }
|
||||
/// <summary>OpenGL sampler object with TextureWrapMode.ClampToEdge (for meshes without wrapping UVs).</summary>
|
||||
|
|
@ -192,11 +190,6 @@ namespace AcDream.App.Rendering.Wb {
|
|||
"OpenGLGraphicsDevice construction failed and its GL prefix did not cleanly roll back.",
|
||||
constructionFailure);
|
||||
}
|
||||
|
||||
// ParticleBatcher is constructed post-ctor by WbMeshAdapter (WbMeshAdapter.cs:78)
|
||||
// after the adapter has wired up all dependencies. The null! here is overridden
|
||||
// immediately after construction; it is not observable as null at runtime.
|
||||
ParticleBatcher = null!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -760,7 +753,6 @@ namespace AcDream.App.Rendering.Wb {
|
|||
ClampSampler = 0;
|
||||
_sceneDataBuffer?.Dispose();
|
||||
_sceneDataBuffer = null;
|
||||
ParticleBatcher?.Dispose();
|
||||
}
|
||||
|
||||
public override IUniformBuffer CreateUniformBuffer(BufferUsage usage, int size) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue