Skip to content

refactor(renderer): retire legacy Renderer/BatchRenderer2D (RC5 Batch 5)#45

Merged
esengine merged 1 commit into
masterfrom
rearch/rc5-retire-legacy
Jun 18, 2026
Merged

refactor(renderer): retire legacy Renderer/BatchRenderer2D (RC5 Batch 5)#45
esengine merged 1 commit into
masterfrom
rearch/rc5-retire-legacy

Conversation

@esengine

Copy link
Copy Markdown
Owner

What

Removes the second batch renderer. The dead Renderer class and the BatchRenderer2D it shared a file with are deleted; ImmediateDraw (the only BatchRenderer2D user) is rebased onto the same TransientBufferPool + StateTracker + GfxDevice path RenderFrame uses — one batch-rendering implementation, single GPU path.

  • Delete renderer/Renderer.{hpp,cpp} (~1,000 lines); drop from CMakeLists.txt and the ESEngine.hpp umbrella (Buffer/Shader/Texture stay).
  • ImmediateDraw owns a TransientBufferPool, generates BatchVertex geometry, batches per texture, and draws via StateTracker.useProgram/bindTexture + device.drawElements. Takes the shared per-App StateTracker.
  • EstellaContext passes the StateTracker into ImmediateDraw.

Net −1,027 lines. ImmediateDraw.cpp has zero raw gl.

Verification

Full build via CI (web). ImmediateDraw depends on RenderContext/ResourceManager so it isn't mock-harnessable; the Emscripten job is the gate.

Follow-up (Batch 5b / 6)

Flip the transitional Shader/Texture/Buffer bind() to StateTracker; trim RenderContext's now-dead quad/shaders; route the last RendererBindings gl* (glClearStencil + diagnostics) through the device; fix TilemapRenderPlugin's collect-time dirty mutation; then the CI guard failing the build on any gl* outside GLDevice.

…Draw on TransientBufferPool (RC5 Batch 5)

The dead Renderer class and the BatchRenderer2D it shared a file with are gone.
ImmediateDraw — the only BatchRenderer2D user — is rebased onto the same
TransientBufferPool + StateTracker + GfxDevice path RenderFrame uses, so the
engine now has a single batch-rendering implementation.

- Delete renderer/Renderer.{hpp,cpp} (~1000 lines); remove from CMakeLists and
  the ESEngine.hpp umbrella (Buffer/Shader/Texture stay).
- ImmediateDraw owns a TransientBufferPool, generates BatchVertex geometry,
  batches per texture, and draws via StateTracker.useProgram/bindTexture +
  device.drawElements. It now takes the shared per-App StateTracker.
- EstellaContext passes the StateTracker into ImmediateDraw.

ImmediateDraw.cpp has zero raw gl; full build validated in CI (web).

Follow-up (Batch 5b/6): flip the transitional Shader/Texture/Buffer bind() to
StateTracker; trim RenderContext's now-dead quad/shaders; route the last
RendererBindings gl* through the device; fix TilemapRenderPlugin's collect-time
dirty mutation; add the CI gl* guard.
@esengine esengine merged commit 3770969 into master Jun 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant