Skip to content

egl: preserve caller state and support surfaceless offscreen contexts - #12

Open
tritao wants to merge 4 commits into
stack/gl-foundationfrom
stack/egl-offscreen
Open

egl: preserve caller state and support surfaceless offscreen contexts#12
tritao wants to merge 4 commits into
stack/gl-foundationfrom
stack/egl-offscreen

Conversation

@tritao

@tritao tritao commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Make Coin's offscreen EGL handling safe for applications that already own EGL state and usable in surfaceless environments.

  • Support explicit surfaceless EGL through `EGL_PLATFORM=surfaceless`.
  • Reuse an active caller display when appropriate.
  • Distinguish borrowed EGL displays from Coin-owned displays.
  • Preserve and restore the client API, display, context, draw surface, and read surface.
  • Support optional core-profile offscreen contexts through `COIN_EGL_CORE_PROFILE=1`.
  • Add focused EGL context-preservation and surfaceless runtime coverage.

The old Wayland/X11 display-probing fallback is intentionally not restored. Coin honors an explicit surfaceless request, reuses active EGL state when possible, and otherwise follows the normal EGL default-display path.

Stack

Layer 2/18, based on PR #11.

@tritao tritao changed the title stack/egl offscreen egl: support robust surfaceless offscreen contexts Aug 8, 2026
@tritao
tritao force-pushed the stack/egl-offscreen branch from 4878add to e9df85a Compare August 8, 2026 00:17
@tritao
tritao force-pushed the stack/egl-offscreen branch from e9df85a to bb6f227 Compare August 8, 2026 01:07
@tritao tritao changed the title egl: support robust surfaceless offscreen contexts egl: preserve caller state in offscreen contexts Aug 8, 2026
@tritao tritao changed the title egl: preserve caller state in offscreen contexts egl: preserve caller state and support surfaceless offscreen contexts Aug 8, 2026
@tritao
tritao force-pushed the stack/egl-offscreen branch 2 times, most recently from 9b41184 to 8047ff9 Compare August 8, 2026 01:30
@tritao
tritao marked this pull request as ready for review August 8, 2026 01:30
@tritao
tritao force-pushed the stack/egl-offscreen branch from 8047ff9 to 184b81f Compare August 8, 2026 11:06
@tritao
tritao force-pushed the stack/egl-offscreen branch from 184b81f to 397fd05 Compare August 8, 2026 11:41
@tritao
tritao force-pushed the stack/egl-offscreen branch from 397fd05 to c31eb53 Compare August 8, 2026 12:06
@tritao
tritao force-pushed the stack/egl-offscreen branch 2 times, most recently from a9bb1ec to b12d484 Compare August 8, 2026 20:31
@tritao
tritao force-pushed the stack/egl-offscreen branch 3 times, most recently from a9181d5 to 5abded1 Compare August 9, 2026 02:34
@tritao
tritao force-pushed the stack/egl-offscreen branch 3 times, most recently from bae652a to e0605fd Compare August 9, 2026 11:44
@tritao
tritao force-pushed the stack/egl-offscreen branch from e0605fd to 1da471f Compare August 9, 2026 14:55
@tritao
tritao force-pushed the stack/egl-offscreen branch from 1da471f to 40f9511 Compare August 9, 2026 15:10
@tritao
tritao force-pushed the stack/egl-offscreen branch 4 times, most recently from d0e6d2b to a7cb2be Compare August 10, 2026 11:57
@tritao
tritao force-pushed the stack/egl-offscreen branch 2 times, most recently from a9c9ce6 to ae1572b Compare August 11, 2026 14:05
@tritao
tritao force-pushed the stack/egl-offscreen branch from ae1572b to eea8241 Compare August 15, 2026 23:32
@tritao
tritao force-pushed the stack/egl-offscreen branch 2 times, most recently from 20b09b6 to 89fd72a Compare August 17, 2026 15:52
@tritao
tritao force-pushed the stack/egl-offscreen branch from 75e3407 to 910dcff Compare August 18, 2026 19:51
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