Skip to content

Commit ad06659

Browse files
committed
feat: render triangle on screen
1 parent 2601910 commit ad06659

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ impl State {
209209
// we need to use a scoped block to release this mutable borrow, to call
210210
// encoder.finish()
211211
{
212-
let _render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
212+
let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
213213
label: Some("Render Pass"),
214214

215215
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
@@ -230,6 +230,9 @@ impl State {
230230

231231
depth_stencil_attachment: None,
232232
});
233+
234+
render_pass.set_pipeline(&self.render_pipeline);
235+
render_pass.draw(0..3, 0..1);
233236
}
234237

235238
self.queue.submit(std::iter::once(encoder.finish()));

0 commit comments

Comments
 (0)