1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
cfg_if::cfg_if! {
if #[cfg(any(feature = "gfx-with-gl", all(feature = "detect-platform", unix, not(target_os="macos")) ))] {
pub use gfx_backend_gl as RenderingAPI;
} else if #[cfg(any(feature = "gfx-with-metal", all(feature = "detect-platform", target_os="macos")))] {
pub use gfx_backend_metal as RenderingAPI;
} else if #[cfg(feature = "gfx-with-vulkan")] {
pub use gfx_backend_vulkan as RenderingAPI;
} else if #[cfg(feature = "gfx-with-dx11")] {
pub use gfx_backend_dx11 as RenderingAPI;
} else if #[cfg(any(feature = "gfx-with-dx12", all(windows, feature = "detect-platform")))] {
pub use gfx_backend_dx12 as RenderingAPI;
} else {
pub use gfx_backend_empty as RenderingAPI;
}
}