Repository navigation
Migrate the toolkit from SDL2 to SDL3 - #18
Merged
Merged
Conversation
There was a problem hiding this comment.
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
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.
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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