Skip to content

rendering: add core OpenGL DrawList backend - #29

Open
tritao wants to merge 5 commits into
stack/retained-render-irfrom
stack/drawlist-gl-backend
Open

rendering: add core OpenGL DrawList backend#29
tritao wants to merge 5 commits into
stack/retained-render-irfrom
stack/drawlist-gl-backend

Conversation

@tritao

@tritao tritao commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add the OpenGL 3.3 DrawList executor using GLSL 330 core semantics. The backend supports both OpenGL compatibility and core contexts.

  • Introduce the renderer backend interface.
  • Add DrawList-specific OpenGL dispatch.
  • Execute retained geometry through SoGLRenderBackend.
  • Keep VBO, index-buffer, texture, program, and VAO ownership inside the backend.
  • Establish a deterministic frame baseline: viewport, matrices, clear color/depth, and required baseline GL state.
  • Render retained positions, vertex colors, indices, and the basic visual shader path.
  • Preserve luminance and luminance-alpha texture upload adaptation needed by the visual path.
  • Generate composable GLSL roots with recursive relative includes and exact build depfiles.
  • Validate the executor on OpenGL 3.3 compatibility and core contexts.
  • Integrate CoinVisualTests with base unlit rendering, model transforms, vertex colors, orthographic projection, and depth/occlusion parity scenes.

This layer deliberately does not own retained material semantics, texture policy,
depth-function/write policy, blending, raster semantics, picking, selection,
render stages, or manager orchestration. Those belong to later stack layers.

Visual validation

CoinVisualTests can be built with or without LegacyGL. LegacyGL is the sole
authority for checked-in reference baselines; DrawList compatibility and core
runs compare against the same LegacyGL images. Baseline updates are rejected
for DrawList and are unavailable when LegacyGL is not built.

The base visual coverage includes:

  • unlit_cube_basic
  • unlit_transformed_cubes
  • unlit_vertex_colors
  • unlit_orthographic_basic
  • unlit_depth_overlap

The DrawList visual adapter rejects a frame when commands contain inconsistent
view/projection matrices, because this layer executes one frame-level matrix
pair. Material, lighting, blending, raster, picking, manager, and lifecycle
coverage remains with its owning layer.

The retained-IR test also verifies that indexed per-vertex material colors are
captured into backend-neutral geometry data, including effective alpha.

Build-system requirement

CMake 3.21 or newer is required for the GLSL root-shader embedding pipeline,
which uses build-time dependency/depfile support. This is a build-system
requirement; DrawList rendering itself does not intrinsically require CMake
3.21.

Stack position

This is the base DrawList execution layer, built on the retained render-IR
layer. Later layers add material and lighting semantics, text preparation,
raster and image state, picking, planning, manager orchestration, and staged
rendering/lifecycle behavior.

@tritao tritao changed the title stack/drawlist gl backend rendering: add core OpenGL DrawList backend Aug 9, 2026
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 9d37115 to 98599db Compare August 9, 2026 01:40
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 98599db to 450129c Compare August 9, 2026 01:51
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch 3 times, most recently from f479e95 to 84d0b47 Compare August 9, 2026 02:21
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 84d0b47 to ed69f26 Compare August 9, 2026 02:35
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from ed69f26 to 30d520a Compare August 9, 2026 02:46
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 736cc60 to 487bea8 Compare August 9, 2026 10:20
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 487bea8 to d911d52 Compare August 9, 2026 10:54
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch 2 times, most recently from 5792286 to b56798e Compare August 9, 2026 11:37
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from b56798e to f7d4e81 Compare August 9, 2026 11:44
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch 2 times, most recently from 1e472a9 to 996b814 Compare August 9, 2026 12:02
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 996b814 to 1b052ba Compare August 9, 2026 12:07
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 1b052ba to c390b55 Compare August 9, 2026 12:13
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 16de094 to dd0a03f Compare August 9, 2026 20:02
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from dd0a03f to 89c0725 Compare August 9, 2026 21:01
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 89c0725 to 6e3ceb9 Compare August 9, 2026 21:55
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch 2 times, most recently from 8890335 to 22a352c Compare August 9, 2026 22:48
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 22a352c to 6dcbe03 Compare August 10, 2026 09:57
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch 2 times, most recently from 407ece0 to f0dcf93 Compare August 10, 2026 11:18
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from f0dcf93 to 8771d05 Compare August 10, 2026 11:23
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 8771d05 to 669d972 Compare August 10, 2026 11:57
@tritao
tritao force-pushed the stack/drawlist-gl-backend branch from 669d972 to 55f8d7a Compare August 10, 2026 13:29
tritao added 5 commits August 18, 2026 11:35
Use CMake 3.21 or newer because the core GLSL root-shader embedding pipeline uses build-time dependency/depfile support. This is a build-system requirement; the DrawList runtime does not intrinsically require CMake 3.21.
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