Closed philippemnoel closed 3 weeks ago
Very cool, thank you for sharing!
Some of these changes are worth merging, in my opinion. I've already made #7499 regarding one of those.
These are the diffs between SDL 2.0.22 and whisthq's fork: https://github.com/madebr/SDL/compare/release-2.0.22..whisthq-SDL
By the way, this is awesome work, thanks for sharing! I've been wanting SDL_CreateTextureFromHandle() for a while myself. :)
The previous link to the diff went away at some point, but here's the full diff between release-2.0.22 and the whisthq fork (1843 lines of diff, total) in a gist:
https://gist.github.com/icculus/2ce8ae160424412b36a8df193a76f8d5
Hi all,
Phil here, I was one of the founders of @whisthq. We were building this low-latency browser streaming software, which used to be based on SDL before we integrated fully into Chromium. We had our own private SDL fork, which we had planned to eventually open-source. Today is that day, I guess.
Here's our public repo: https://github.com/whisthq/SDL
We shut down our company recently, unfortunately before bringing this code upstream ourselves, so I figured I'd share it with the SDL community here. Hopefully someone can bring some of those features into upstream if they are found to be valuable to the wider community. The README lists all the high-level features we built, primarily on macOS, and here they are for convenience:
Whist Changelog
Copy
README.txt
toREADME.md
so that GitHub will render it nicely, and update it with our continuous integration workflowAllow
Command+W
to passthrough to the application on macOS, instead of being captured by the "Close Window" shortcutEnable capturing macOS pinch gestures using Cocoa, to enable pinch-to-zoom on macOS trackpad devices
Added SDL events for detection window occlusion on macOS. On Windows, we chose not to implement this feature as it requires complex engineering for little benefits.
Created a GitHub Actions workflows,
build-and-publish-sdl.yml
, to build, test and publish on Windows, macOS and Linux UbuntuAdded SDL hint for setting the SDL window and title bar to be integrated within the SDL window, on macOS
Fixed an issue with watching videos on the Whist remote browser when the SDL window is in fullscreen mode
Added an option to set a flag specifying a Cmd+Q force quitting on macOS when exiting the SDL application, to be passed to a frontend framework like Electron
Added a new function
SDL_CreateTextureFromHandle()
to create SDL textures backed by hardware frames already on the GPU. This allows us to directly pass textures to the renderer instead of copying to a single, repeatedly rendered texture. This is implemented for D3D11 textures on Windows and Metal textures / Core Video buffers on macOS.Force SDL to render the sRGB color profile on macOS, to make colors match native macOS more closely
That's it for me! Thank you all for making this project possible in the first place and hope some of our work can benefit someone else. Much open-source ❤️ from myself & the entire Whist team