Add most bits and pieces for iced support

This commit is contained in:
Robbert van der Helm
2022-03-12 23:15:33 +01:00
parent cd5a4f01bf
commit 3ebe34c870
5 changed files with 195 additions and 1 deletions

View File

@@ -7,6 +7,10 @@ license = "ISC"
description = "An adapter to use egui GUIs with NIH-plug"
[features]
default = ["opengl"]
opengl = []
[dependencies]
nih_plug = { path = ".." }

View File

@@ -12,6 +12,9 @@ use parking_lot::RwLock;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
#[cfg(not(feature = "opengl"))]
compile_error!("There's currently no software rendering support for egui");
/// Re-export for convenience.
pub use egui;
@@ -111,6 +114,8 @@ where
scale: scaling_factor
.map(|factor| WindowScalePolicy::ScaleFactor(factor as f64))
.unwrap_or(WindowScalePolicy::SystemScaleFactor),
#[cfg(feature = "opengl")]
gl_config: Some(GlConfig {
version: (3, 2),
red_bits: 8,