error if attempting to build with multiple renderers

This commit is contained in:
Alex Janka 2023-10-04 12:00:10 +11:00
parent 4a5ab2a90a
commit f023073cab

View file

@ -26,6 +26,9 @@ use std::{
sync::{mpsc::Receiver, Arc, Mutex}, sync::{mpsc::Receiver, Arc, Mutex},
}; };
#[cfg(all(feature = "vulkan", feature = "pixels"))]
compile_error!("select only one rendering backend!");
#[allow(unused_attributes)] #[allow(unused_attributes)]
#[cfg(any(feature = "vulkan-renderer", feature = "pixels-renderer"))] #[cfg(any(feature = "vulkan-renderer", feature = "pixels-renderer"))]
#[cfg_attr(feature = "pixels-renderer", path = "renderer/pixels.rs")] #[cfg_attr(feature = "pixels-renderer", path = "renderer/pixels.rs")]