You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/WebGPUWindowDemo/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ Separating animation from rendering keeps the sample structure close to a normal
108
108
this.window.Run(this.OnRender);
109
109
```
110
110
111
-
`WebGPUWindow<TPixel>.Run(...)` acquires one `WebGPUSurfaceFrame<TPixel>` per render callback and disposes it automatically after your callback returns. In this sample that means you do not call `Present()` or `Flush()` yourself.
111
+
`WebGPUWindow<TPixel>.Run(...)` acquires one `WebGPUSurfaceFrame<TPixel>` per render callback and disposes it automatically after your callback returns. In this sample that means you do not call `Flush()` yourself.
112
112
113
113
Inside `OnRender(...)` the sample:
114
114
@@ -154,7 +154,7 @@ This sample uses the `Run(Action<WebGPUSurfaceFrame<TPixel>>)` overload, so fram
154
154
Two practical consequences:
155
155
156
156
- you do not need to call `canvas.Flush()` in this sample
157
-
-you only need `frame.Present()` if you are driving frames manually and want to present before disposal
157
+
-manual frame loops should dispose each acquired frame exactly once
158
158
159
159
## What actually runs on the GPU
160
160
@@ -186,7 +186,7 @@ Notes:
186
186
187
187
- a `false` result is normal retry behavior, not necessarily an error
188
188
- this can happen when the surface is outdated, lost, timed out, or the framebuffer is currently zero-sized
189
-
- disposing the frame is normally enough; explicit `Present()` is optional
189
+
- disposing the frame flushes queued canvas work, presents the surface, and releases per-frame resources
0 commit comments