Skip to content

refactor(renderer): trim RenderContext dead quad/shader resources (RC5 cleanup)#47

Merged
esengine merged 1 commit into
masterfrom
rearch/rc5-bind-coherence
Jun 18, 2026
Merged

refactor(renderer): trim RenderContext dead quad/shader resources (RC5 cleanup)#47
esengine merged 1 commit into
masterfrom
rearch/rc5-bind-coherence

Conversation

@esengine

Copy link
Copy Markdown
Owner

What

Dead-code cleanup following the legacy-renderer retirement (#45). The quad VAO and color/texture/extMesh shaders RenderContext created were only ever used by the retired Renderer class — getQuadVAO/getColorShader/getTextureShader/getExtMeshShader now have zero callers.

  • Remove those four members, their getters, and initQuadData/initShaders.
  • RenderContext::init() now creates only the white texture (its sole live resource), dropping three unused shader compilations + a VAO/VBO/IBO allocation from every App's startup.

Net −86 lines. Verified: no remaining references to the removed symbols.

Remaining RC5 (optional refinements — assessed)

  • bind() through StateTracker: a few per-frame Shader::bind() sites (PostProcess, ShapePlugin, GeometryBindings, RenderFrame) still route through the device rather than the tracker. This is cache-coherence purity, not a live bug — StateTracker::reset() each frame sets the cache to 0 and the main path runs before PostProcess, so no wrong dedup occurs. Completing it means injecting StateTracker into PostProcess.
  • TilemapRenderPlugin dirty: collect() clears ChunkData.dirty (a mutable content-side flag). The clean fix is a generation counter in ChunkData (TilemapSystem change) so the plugin detects rebuilds read-only — orthogonal to the renderer/GfxDevice work.

…RC5 cleanup)

The quad VAO and color/texture/extMesh shaders RenderContext created were only
ever consumed by the retired Renderer class (deleted in #45) — getQuadVAO/
getColorShader/getTextureShader/getExtMeshShader have zero callers now.

Remove those members, their getters, and initQuadData/initShaders. init() now
creates only the white texture (its sole live resource), dropping three unused
shader compilations and a VAO/VBO/IBO allocation from every App's startup.
@esengine esengine merged commit c9c9939 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