docs/bevy/examples/app/no_renderer.rs 657 B · 25 lines · raw · history

1 //! An application that runs with default plugins and displays an empty
2 //! window, but without an actual renderer.
3 //! This can be very useful for integration tests or CI.
4 //!
5 //! See also the `headless` example which does not display a window.
6
7 use bevy::{
8 prelude::*,
9 render::{settings::WgpuSettings, RenderPlugin},
10 };
11
12 fn main() {
13 App::new()
14 .add_plugins(
15 DefaultPlugins.set(RenderPlugin {
16 render_creation: WgpuSettings {
17 backends: None,
18 ..default()
19 }
20 .into(),
21 ..default()
22 }),
23 )
24 .run();
25 }