RustAudio / vst-rs

VST 2.4 API implementation in rust. Create plugins or hosts. Previously rust-vst on the RustDSP group.
MIT License
1.04k stars 91 forks source link

GUI example #82

Open Walther opened 5 years ago

Walther commented 5 years ago

As a VST developer, I want to be able to use rust-vst to create a VST that has a graphical user interface.

To help this, rust-vst should provide at least one example in the examples directory that uses one possible approach for making a GUI.

(Further GUI feature development, support for other GUI libraries/frameworks can follow in additional issues.)

ledyba commented 2 years ago

Hi! I'm creatirng vst plugin with a GUI

ledyba/logica: https://github.com/ledyba/logica

It uses egui + egui-winit + egui_glium.

GUI works, but it requires many work to upgrade egui libs, because egui is still under development.

image

sebastianpfluegelmeier commented 2 years ago

@ledyba how did you get winit to run with vst-rs? vst-rs provides its own window and as far as i know, winit can't attach to an existing window, how did you handle that?

ledyba commented 2 years ago

@sebastianpfluegelmeier I made a window as a child of existing one provided by vst-rs.

https://github.com/ledyba/logica/blob/5f34a09b2c33db84f7bb7d56492d017ef1a23160/src/editor.rs#L178-L184

.with_parent_window(unsafe { std::mem::transmute(parent) }); embeds a new window (created by winit) in existing one (created by vst-rs or host).