MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / draw

Method draw

src/grid.rs:186–197  ·  view source on GitHub ↗
(&'a self, pass: &mut RenderPass<'a>, camera_bind_group: &'a BindGroup)

Source from the content-addressed store, hash-verified

184 }
185
186 pub(crate) fn draw(&self, pass: &mut RenderPass<'_>, camera_bind_group: &BindGroup) {
187 if self.vertex_count == 0 {
188 return;
189 }
190
191 if let (Some(pipeline), Some(vb)) = (&self.pipeline, &self.vertex_buffer) {
192 pass.set_pipeline(pipeline);
193 pass.set_bind_group(0, camera_bind_group, &[]);
194 pass.set_vertex_buffer(0, vb.slice(..));
195 pass.draw(0..self.vertex_count, 0..1);
196 }
197 }
198}
199
200impl Default for Grid {

Callers 2

serviceMethod · 0.45
encodeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected