Skip to content

Fall back to SDL's default renderer when OpenGL ES 2 isn't available - #548

Merged
colemancda merged 1 commit into
masterfrom
appkit-renderer-fallback
Dec 4, 2026
Merged

colemancda merged 1 commit into
masterfrom
appkit-renderer-fallback

Conversation

@colemancda

Copy link
Copy Markdown
Member

A window draws through an SDL renderer, OpenGL ES 2 unless SDL_RENDER_DRIVER names another. When that renderer couldn't be made, the window had none and drew nothing, not even its background. Only the warning SDL could not make a renderer showed. This happened with i386 apps on an x86_64 Debian 13 machine that has 32-bit OpenGL but no 32-bit libGLESv2.so.2.

NSWindow.swift now asks SDL for its default renderer when the named one fails. Both steps are logged to stderr:

perry: AppKit: SDL could not make its opengles2 renderer (opengles2 not available); trying SDL's default
perry: AppKit: window 101 draws with SDL's opengl renderer in place of opengles2

If the default renderer also fails, the existing SDL could not make a renderer warning is printed.

Tested with the i386 Property List Editor from Xcode 2.4.1 under perry32:

  • Without the 32-bit OpenGL ES library, it logs both lines above and draws with SDL's OpenGL renderer, with the grey window background.
  • With the library, it uses OpenGL ES 2 as before.

@colemancda
colemancda merged commit bc11545 into master Dec 4, 2026
7 of 10 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