Parent
- Program: ENG2 — GoudEngine v2 Rebuild (see the pinned master tracking issue)
- Phase / Milestone: Phase 2 — Render Core v2 (
eng2-p2-render-core)
- Batch / Group: Batch 2.1 — Foundations from RFC-0005, Group B
- Runbook spec:
docs/src/runbook/phases/phase-2.md (committed with the roadmap)
Summary
Delete the legacy legacy-glfw-opengl backend implementation and its glfw platform path, executing the ADR written in ENG2-P0-10, while keeping the RenderBackend trait seam intact for the remaining wgpu backend.
Architecture Context
Layer: Layer 2 (Libs) — libs/graphics/backend/ (see tools/lint_layers.rs — downward-only deps).
Modules/types touched:
goud_engine/src/libs/graphics/backend/ — remove the OpenGL/glfw backend implementation behind the legacy-glfw-opengl feature flag.
- Platform init files that branch on the legacy backend feature.
Cargo.toml — drop the legacy-glfw-opengl feature and its glfw/gl dependencies.
Boundary constraints (only those that apply):
- Raw GPU calls stay in
libs/graphics/backend/ — no wgpu:: outside it (this issue removes the gl:: half of that rule, not the boundary itself).
- The
RenderBackend trait abstraction MUST remain — this is a deletion of one implementation, not the seam.
Pattern to follow: ENG2-P0-10 ADR (must be merged before this executes) and .agents/rules/graphics-patterns.md's backend-isolation rule.
Scope
Acceptance Criteria
Breaking Change & Throne Follow-up
Breaking. Removes the legacy-glfw-opengl feature and the OpenGL rendering path entirely — no compatibility shim is kept (binding user decision: no legacy code retained where we refactor). Throne is already on the wgpu/Metal path, so no adoption follow-up issue is required for this specific removal — confirm this in the PR description by checking Throne's active feature flags before closing.
Blocked By
ENG2-P0-10 (the ADR deciding this removal must merge first).
Files Likely Touched
- New/Modified/Generated:
goud_engine/src/libs/graphics/backend/ (OpenGL implementation deleted), Cargo.toml, ARCHITECTURE.md
Agent Notes
- ADR context (ENG2-P0-10):
ARCHITECTURE.md says wgpu is the default backend, while ALPHA_ROADMAP.md:1246-1248 claims wgpu is incomplete and GL bypasses the abstraction — this issue executes the ADR's resolution (verify the ADR's conclusion before deleting; do not assume without reading it first).
- Frees all later Phase 2 work (instancing, dynamic offsets, GPU timestamps) from needing to support two backends simultaneously — sequence this early in Batch 2.1 for that reason, per the batch table.
- Per the ADR investigation, confirm the live/active backend in code (not just docs) before deleting —
RenderBackendKind selection happens at GoudGame init time per .agents/rules/graphics-patterns.md.
Verification
cargo check && cargo fmt --all -- --check && cargo clippy -- -D warnings
cargo test
./codegen.sh && git diff --exit-code
Parent
eng2-p2-render-core)docs/src/runbook/phases/phase-2.md(committed with the roadmap)Summary
Delete the legacy
legacy-glfw-openglbackend implementation and its glfw platform path, executing the ADR written in ENG2-P0-10, while keeping theRenderBackendtrait seam intact for the remaining wgpu backend.Architecture Context
Layer: Layer 2 (Libs) —
libs/graphics/backend/(seetools/lint_layers.rs— downward-only deps).Modules/types touched:
goud_engine/src/libs/graphics/backend/— remove the OpenGL/glfw backend implementation behind thelegacy-glfw-openglfeature flag.Cargo.toml— drop thelegacy-glfw-openglfeature and its glfw/gl dependencies.Boundary constraints (only those that apply):
libs/graphics/backend/— nowgpu::outside it (this issue removes thegl::half of that rule, not the boundary itself).RenderBackendtrait abstraction MUST remain — this is a deletion of one implementation, not the seam.Pattern to follow: ENG2-P0-10 ADR (must be merged before this executes) and
.agents/rules/graphics-patterns.md's backend-isolation rule.Scope
legacy-glfw-openglfeature flag fromCargo.tomland anycfg-gated code referencing it.ARCHITECTURE.md/ALPHA_ROADMAP.mdcontradiction called out in the ADR.goud_engine/tests/spec/+ unit/isolation coverage for the new code paths..agents/rules/graphics-patterns.mdordocs/src/*.Acceptance Criteria
legacy-glfw-openglfeature and allgl::calls are absent from the codebase (grep-gated).RenderBackendtrait and the wgpu implementation build and pass all existing renderer tests unchanged.ARCHITECTURE.md) state wgpu as the only backend, no contradiction remains.cargo check && cargo fmt --all -- --check && cargo clippy -- -D warningsclean;cargo testgreen;./codegen.sh && git diff --exit-code(drift gate)Breaking Change & Throne Follow-up
Breaking. Removes the
legacy-glfw-openglfeature and the OpenGL rendering path entirely — no compatibility shim is kept (binding user decision: no legacy code retained where we refactor). Throne is already on the wgpu/Metal path, so no adoption follow-up issue is required for this specific removal — confirm this in the PR description by checking Throne's active feature flags before closing.Blocked By
ENG2-P0-10 (the ADR deciding this removal must merge first).
Files Likely Touched
goud_engine/src/libs/graphics/backend/(OpenGL implementation deleted),Cargo.toml,ARCHITECTURE.mdAgent Notes
ARCHITECTURE.mdsays wgpu is the default backend, whileALPHA_ROADMAP.md:1246-1248claims wgpu is incomplete and GL bypasses the abstraction — this issue executes the ADR's resolution (verify the ADR's conclusion before deleting; do not assume without reading it first).RenderBackendKindselection happens atGoudGameinit time per.agents/rules/graphics-patterns.md.Verification