mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-25 08:18:43 -06:00
set pipeline before drawing
This commit is contained in:
parent
777e0af4a4
commit
12c54069f3
|
@ -170,8 +170,9 @@ pub fn draw_world(
|
|||
// //! //TODO THIS IS PROBABLY UB
|
||||
// AND I DONT FUCKING CARE
|
||||
let mesh = unsafe { yolo(meshes.get(key).expect("Mesh index pointing to nothing")) };
|
||||
let bind_group = unsafe { yolo(&gpu_data.bind_group) };
|
||||
render_pass.set_bind_group(0, bind_group, &[]);
|
||||
let gpu_data = unsafe { yolo(gpu_data.as_ref()) };
|
||||
render_pass.set_pipeline(&gpu_data.pipeline);
|
||||
render_pass.set_bind_group(0, &gpu_data.bind_group, &[]);
|
||||
render_pass.set_vertex_buffer(0, mesh.vertex_buffer.slice(..));
|
||||
render_pass.set_index_buffer(mesh.index_buffer.slice(..), wgpu::IndexFormat::Uint32);
|
||||
render_pass.draw_indexed(0..mesh.idx_count, 0, 0..1);
|
||||
|
|
Loading…
Reference in a new issue