Skip to content

Migrate the toolkit from SDL2 to SDL3 - #18

Merged
hermet merged 1 commit into
mainfrom
hermet/sdl3
Oct 5, 2026
Merged

hermet merged 1 commit into
mainfrom
hermet/sdl3

Conversation

@hermet

@hermet hermet commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Require SDL 3.2.0 or later and update window creation, input events,
OpenGL context cleanup, and WebGPU native handle access to SDL3 APIs.

Keep application entry points under application control with
SDL_MAIN_HANDLED, and disable X11 compositor bypass on Linux and FreeBSD.
Enable resizing for WebGPU windows.

Update the README and Linux CI dependencies for SDL3, move CI to
Ubuntu 26.04, and credit the migration contributor.

Issue: #10

@hermet hermet self-assigned this Oct 5, 2026
@hermet hermet added the upgrade upgrade dependencies label Oct 5, 2026
@hermet
hermet requested a balanced review from Copilot October 5, 2026 06:49
@hermet hermet mentioned this pull request Oct 5, 2026
@hermet hermet changed the title Migrate from SDL2 to SDL 3. Migrate from SDL2 to SDL 3 Oct 5, 2026
@hermet hermet changed the title Migrate from SDL2 to SDL 3 Upgrade SDL2 to SDL 3 Oct 5, 2026
@hermet hermet changed the title Upgrade SDL2 to SDL 3 Migrate the toolkit from SDL2 to SDL3 Oct 5, 2026
@hermet hermet assigned vpxyz and unassigned hermet Oct 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

SDL3 migration introduces unsafe OpenGL cleanup, truncated wheel input, and an invalid WebGPU fallback path.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
What changed in this PR

Migrates ThorVG Toolkit from SDL2 to SDL3 across runtime integration, dependencies, CI, and documentation.

Changes:

  • Updates SDL event, window, OpenGL, and native WebGPU APIs.
  • Requires SDL 3.2+ and updates CI dependencies.
  • Refreshes documentation and contributors.
File Description
src/​tvgWindow.h Uses SDL3 headers.
src/​tvgWindow.cpp Migrates windowing, events, and graphics integration.
src/​meson.build Requires SDL 3.2+.
README.md Documents SDL3 dependency.
CONTRIBUTORS.md Adds a contributor.
.github/​workflows/​build.yml Updates Ubuntu runner and SDL package.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/tvgWindow.cpp
Comment thread src/tvgWindow.cpp
Comment thread src/tvgWindow.cpp
- Require SDL 3.2.0 or later and update window creation, input events,
  OpenGL context cleanup, and WebGPU native handle access to SDL3 APIs.

- Keep application entry points under application control with
  SDL_MAIN_HANDLED, and disable X11 compositor bypass on Linux and FreeBSD.
  Enable resizing for WebGPU windows.

- Update the README and Linux CI dependencies for SDL3, move CI to
  Ubuntu 26.04, and credit the migration contributor.

- Use float for motion and wheel callbacks. Preserve fractional mouse
  coordinates and scroll amounts from SDL3 events without truncating
  them to integers.

Issue: #10
@hermet
hermet merged commit 537b32c into main Oct 5, 2026
5 checks passed
@hermet
hermet deleted the hermet/sdl3 branch October 5, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upgrade upgrade dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants