Skip to content

Commit 784542b

Browse files
committed
[update] documentation.
1 parent 67c81a8 commit 784542b

4 files changed

Lines changed: 13 additions & 12 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ cargo run --example triangles
184184

185185
* ### Architecture support
186186

187-
* [x] x86
187+
* [x] x86
188188
* [x] arm64
189189

190190
* ### Operating system support
191191

192-
* [x] MacOS
192+
* [x] MacOS
193193
* [x] Linux
194194
* [x] Windows 10/11
195195
* [ ] Xbox Series S|X (Long term goal)
@@ -198,7 +198,7 @@ cargo run --example triangles
198198

199199
* ### Rendering API support
200200

201-
* [x] OpenGL
201+
* [x] OpenGL
202202
* [x] Vulkan
203203
* [x] Metal
204204
* [x] DirectX11

docs/tutorials/immediates-multiple-triangles.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ Reference implementation: `crates/lambda-rs/examples/triangles.rs`.
3636
- [Requirements and Constraints](#requirements-and-constraints)
3737
- [Data Flow](#data-flow)
3838
- [Implementation Steps](#implementation-steps)
39-
- [Step 1 — Define the Push Constant Layout](#step-1)
39+
- [Step 1 — Define the Immediate Data Layout](#step-1)
4040
- [Step 2 — Shaders for Position, Scale, and Color](#step-2)
41-
- [Step 3 — Build a Pipeline with Push Constants](#step-3)
42-
- [Step 4 — Push Constants per Draw](#step-4)
41+
- [Step 3 — Build a Pipeline with Immediates](#step-3)
42+
- [Step 4 — Immediates per Draw](#step-4)
4343
- [Step 5 — Input and Resize Handling](#step-5)
4444
- [Validation](#validation)
4545
- [Notes](#notes)
@@ -129,7 +129,7 @@ let immediate_size = std::mem::size_of::<ImmediateData>() as u32;
129129

130130
let pipeline = pipeline::RenderPipelineBuilder::new()
131131
.with_culling(pipeline::CullingMode::None)
132-
.with_push_constant(PipelineStage::VERTEX, immediate_size)
132+
.with_immediate_data(PipelineStage::VERTEX, immediate_size)
133133
.build(
134134
render_context.gpu(),
135135
render_context.surface_format(),

docs/tutorials/reflective-room.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Reference implementation: `crates/lambda-rs/examples/reflective_room.rs`.
6868
- Immediate data size and stage visibility MUST match the shader declaration. Two `mat4` values are sent to the vertex stage only (128 bytes total).
6969

7070
> **Note:** In wgpu v28, push constants were renamed to "immediates" and require the `Features::IMMEDIATES` feature. The GLSL syntax remains `push_constant`.
71+
7172
- Matrix order MUST match the shader’s expectation. The example transposes matrices before upload to match GLSL column‑major multiplication.
7273
- The render pass and pipelines MUST use the same sample count when MSAA is enabled.
7374
- Acronyms: graphics processing unit (GPU), central processing unit (CPU), multi‑sample anti‑aliasing (MSAA), model‑view‑projection (MVP).
@@ -244,7 +245,7 @@ let pipe_floor_mask = RenderPipelineBuilder::new()
244245
.with_depth_format(lambda::render::texture::DepthFormat::Depth24PlusStencil8)
245246
.with_depth_write(false)
246247
.with_depth_compare(CompareFunction::Always)
247-
.with_push_constant(PipelineStage::VERTEX, std::mem::size_of::<ImmediateData>() as u32)
248+
.with_immediate_data(PipelineStage::VERTEX, std::mem::size_of::<ImmediateData>() as u32)
248249
.with_buffer(floor_vertex_buffer, floor_attributes)
249250
.with_stencil(StencilState {
250251
front: StencilFaceState { compare: CompareFunction::Always, fail_op: StencilOperation::Keep, depth_fail_op: StencilOperation::Keep, pass_op: StencilOperation::Replace },
@@ -271,7 +272,7 @@ let mut builder = RenderPipelineBuilder::new()
271272
.with_label("reflected-cube")
272273
.with_culling(lambda::render::pipeline::CullingMode::Front)
273274
.with_depth_format(lambda::render::texture::DepthFormat::Depth24PlusStencil8)
274-
.with_push_constant(PipelineStage::VERTEX, std::mem::size_of::<ImmediateData>() as u32)
275+
.with_immediate_data(PipelineStage::VERTEX, std::mem::size_of::<ImmediateData>() as u32)
275276
.with_buffer(cube_vertex_buffer, cube_attributes)
276277
.with_stencil(StencilState {
277278
front: StencilFaceState { compare: CompareFunction::Equal, fail_op: StencilOperation::Keep, depth_fail_op: StencilOperation::Keep, pass_op: StencilOperation::Keep },
@@ -299,7 +300,7 @@ Draw the floor surface with a translucent tint so the reflection remains visible
299300
```rust
300301
let mut floor_vis = RenderPipelineBuilder::new()
301302
.with_label("floor-visual")
302-
.with_push_constant(PipelineStage::VERTEX, std::mem::size_of::<ImmediateData>() as u32)
303+
.with_immediate_data(PipelineStage::VERTEX, std::mem::size_of::<ImmediateData>() as u32)
303304
.with_buffer(floor_vertex_buffer, floor_attributes)
304305
.with_multi_sample(msaa_samples);
305306

@@ -327,7 +328,7 @@ Draw the unreflected cube above the floor using the lit fragment shader. Enable
327328
```rust
328329
let mut normal = RenderPipelineBuilder::new()
329330
.with_label("cube-normal")
330-
.with_push_constant(PipelineStage::VERTEX, std::mem::size_of::<ImmediateData>() as u32)
331+
.with_immediate_data(PipelineStage::VERTEX, std::mem::size_of::<ImmediateData>() as u32)
331332
.with_buffer(cube_vertex_buffer, cube_attributes)
332333
.with_multi_sample(msaa_samples);
333334

docs/tutorials/textured-cube.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ let immediate_data_size = std::mem::size_of::<ImmediateData>() as u32;
376376
let pipeline = RenderPipelineBuilder::new()
377377
.with_culling(CullingMode::Back)
378378
.with_depth()
379-
.with_push_constant(PipelineStage::VERTEX, immediate_data_size)
379+
.with_immediate_data(PipelineStage::VERTEX, immediate_data_size)
380380
.with_buffer(
381381
BufferBuilder::build_from_mesh(&mesh, render_context.gpu())
382382
.expect("Failed to create vertex buffer"),

0 commit comments

Comments
 (0)