Merge pull request #60 from cedric-h/patch-2

Add an explanation of what entry_point means
pull/66/head
sotrh 4 years ago committed by GitHub
commit 9159a09a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -145,7 +145,7 @@ let render_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescrip
```
Two things to note here:
1. You can specify an `entry_point` for your shaders. I normally use `"main"` as that's what it would be in OpenGL, but feel free to use whatever name you like.
1. Here you can specify which function inside of the shader should be called, which is known as the `entry_point`. I normally use `"main"` as that's what it would be in OpenGL, but feel free to use whatever name you like. Make sure you specify the same entry point when you're compiling your shaders as you do here where you're exposing them to your pipeline.
2. The `fragment_stage` is technically optional, so you have to wrap it in `Some()`. I've never used a vertex shader without a fragment shader, but the option is available if you need it.
```rust

Loading…
Cancel
Save