Hi SDL Pros!
I am a long time core developer of the cross platform GUI library FLTK (www.fltk.org). FLTK supports multiple back ends, mainly X11, Waland, macOS Cocoa, and MSWindow. I believe it would be great to have FLTK run on top of SDL.
Use cases for SDL users are games and emulators that are otherwise fullscreen, but need a settings window. Or a popup dialog, a pulldown menu, etc. etc. . For FLTK users, SDL would finally open up the world of mobile devices and so many more platforms supported by SDL.
I have a somewhat working concept that I wrote in 2023: GitHub - MatthiasWM/fltk at mm_sdl2 , but this time around, I want to used SDL3 to make this work perfectly for existing SDL apps.
Is this the best forum to get help? What other resources are a good way to get started? What wishes do SDL users have for a GUI library as an extension of SDL?
Thanks for any help and good pointers,
Matthias
Hi!
This is a good place to ask questions, and if you’re running into specific issues with integration you can create an issue on the GitHub repo.
To answer your questions, I’ve seen two main use cases:
The first is embedding an SDL window in a view inside a UI toolkit. This is typically done by creating a native window that the toolkit manages and then wrapping it in an SDL window using the properties for external window handles, e.g. SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER
in SDL3/SDL_CreateWindowWithProperties - SDL Wiki
The second, and the case I usually find myself wanting, is to use a UI toolkit as a lightweight UI inside an existing SDL window. The way this is implemented depends on how graphics are being output in the window. ImGui solves this by having lightweight renderer implementations that you can select depending on how you’re rendering. They have one for the SDL 2D renderer, SDL GPU, OpenGL, etc.
Feel free to ask more questions as you get farther along!
1 Like