Skip to content

Commit ba3252e

Browse files
committed
Update README.md
1 parent 14e7e7a commit ba3252e

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,15 @@ pub enum MyVertex {}
6767
impl EntryPoint for MyVertex {
6868
const NAME: EntryPointName = "vertex";
6969
const PARAMETERS: EntryPointParameters = &[];
70+
const CONSTANTS: EntryPointConstants = &[];
7071
}
7172

7273
pub enum MyFragment {}
7374

7475
impl EntryPoint for MyFragment {
7576
const NAME: EntryPointName = "fragment";
7677
const PARAMETERS: EntryPointParameters = &[];
78+
const CONSTANTS: EntryPointConstants = &[];
7779
}
7880

7981
// Then, impl RustGpuMaterial for our material to tie them together
@@ -90,8 +92,20 @@ Next, add `RustGpuPlugin` to your bevy app to configure the backend.
9092

9193
```rust
9294
let mut app = App::default();
93-
app.add_plugin(RustGpuPlugin); // Must be before RenderPlugin, i.e. before DefaultPlugins
94-
app.add_plugins(DefaultPlugins);
95+
96+
// Add default plugins
97+
app.add_plugins(
98+
DefaultPlugins
99+
.set(
100+
// Configure the render plugin with RustGpuPlugin's recommended WgpuSettings
101+
RenderPlugin {
102+
wgpu_settings: RustGpuPlugin::wgpu_settings(),
103+
},
104+
),
105+
);
106+
107+
// Add the Rust-GPU plugin
108+
app.add_plugin(RustGpuPlugin);
95109
```
96110

97111
For each `RustGpuMaterial` implementor, add a `RustGpuMaterialPlugin::<M>` to your app to setup backend rendering machinery.

0 commit comments

Comments
 (0)