Skip to content

refactor(renderer): single GL boundary + CI guard (RC5 Batch 5b/6)#46

Merged
esengine merged 1 commit into
masterfrom
rearch/rc5-single-gl-boundary
Jun 18, 2026
Merged

refactor(renderer): single GL boundary + CI guard (RC5 Batch 5b/6)#46
esengine merged 1 commit into
masterfrom
rearch/rc5-single-gl-boundary

Conversation

@esengine

Copy link
Copy Markdown
Owner

What

Completes RC5's keystone — zero raw gl* calls outside GLDevice.cpp (135 → 0), enforced by CI.

  • GfxDevice: add getString(GfxStringName) + getInt(GfxIntParam) so diagnostics/capability queries go through the device. GLDevice implements them.
  • RendererBindings: renderer_diagnose, checkGLErrors, and renderer_clearStencil now route through the device (getString/getInt/getError/setClearStencil); the OpenGLHeaders include is dropped.
  • Engine: remove the dead getMaxTextureSize() (no callers anywhere) and its GL include — the last gl* call outside the backend.
  • CI guard: tools/check-gl-boundary.mjs + a build.yml step fail the build if any gl[A-Z]\w*( appears outside GLDevice.cpp. Bypassing the device is now a build error, not a silent regression.

Verification

Guard passes locally (0 violations); the four MockGfxDevice harnesses still compile/pass against the expanded interface. Full web build + the new guard step run in CI.

Remaining RC5 polish (follow-up)

Flip the transitional Shader/Texture/Buffer/VAO bind() (currently device-routed) to StateTracker so all binds dedupe through the one cache; trim RenderContext's now-dead quad/colorShader/textureShader; fix TilemapRenderPlugin's collect-time dirty mutation. These are coherence/cleanup — the GL boundary itself is now complete and guarded.

… CI guard (RC5 Batch 5b/6)

Completes the keystone: zero raw gl* outside GLDevice.cpp (135 -> 0), enforced
by CI.

- GfxDevice: add getString(GfxStringName) + getInt(GfxIntParam) so diagnostics
  and capability queries go through the device. GLDevice implements them.
- RendererBindings: renderer_diagnose, checkGLErrors and renderer_clearStencil
  now route through the device (getString/getInt/getError/setClearStencil); the
  OpenGLHeaders include is dropped.
- Engine: remove the dead getMaxTextureSize() (no callers) and its GL include —
  the last gl* call outside the backend.
- tools/check-gl-boundary.mjs + a build.yml step: any `gl[A-Z]\w*(` outside
  GLDevice.cpp fails the build, so bypassing the device is now a build error.

Verified: guard passes locally (0 violations); MockGfxDevice harnesses green.
@esengine esengine merged commit fa7f025 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