Using SDL for the plugin window #1066
-
After using WDL-OL in 2011-2015 for my commercial plugins I'm back with a more low level need than before: this time not only do I still need to display a framebuffer in a window, but I also need all inputs given to the plugin window all at once. Can I and should I use SDL for this, is there any downside to using SDL, like is there anything wrong with making a SDL window (I don't know much about how DAWs handle windows) instead of whatever IPlug2 uses? Like would it cause integration problem with the DAW, or would the DAW have problems with control automation? I see that the two IPlug2 graphic backends have their issues so maybe using SDL would be a way to sidestep their issues as well. If you want to know the details of why I might need SDL instead of what's currently offered it's because I need to:
I need something so radically low level and generic because I'm writing an open source host plugin for my own kind of module (WebAssembly modules that communicate with their host through text, see host library here), and those modules do their own GUI in an isolated and independent way that the host knows nothing about, they just need the host to provide all the low level inputs, control over the mouse and access to the clipboard. For instance a module will have its own text editor controls, but it's impossible to know anything about the text editing outside of the module, from the outside all we see is pixels. Likewise a module might capture the mouse but we don't know what for, it could be for moving a knob indefinitely, or it could be for playing Doom, who knows. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't really know the practical implications of using SDL in a plug-in. @madronalabs is doing something with his framework here: https://github.com/madronalabs/mlvg . IIRC GLFW is difficult to use in a plug-in, I am not sure if SDL has the same issue. PUGL is like GLFW but designed of plug-ins, and looks pretty good. You can find a WIP example of it being used in iPlug2 here. CPLUG looks like a nice new plugin abstraction that might be worth investigating for your project |
Beta Was this translation helpful? Give feedback.
I don't really know the practical implications of using SDL in a plug-in. @madronalabs is doing something with his framework here: https://github.com/madronalabs/mlvg . IIRC GLFW is difficult to use in a plug-in, I am not sure if SDL has the same issue. PUGL is like GLFW but designed of plug-ins, and looks pretty good. You can find a WIP example of it being used in iPlug2 here. CPLUG looks like a nice new plugin abstraction that might be worth investigating for your project