MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / ensure_draw_state_3d

Method ensure_draw_state_3d

native/shared/src/renderer/mod.rs:12421–12430  ·  view source on GitHub ↗
(&mut self, texture_idx: u32)

Source from the content-addressed store, hash-verified

12419 // ============================================================
12420
12421 fn ensure_draw_state_3d(&mut self, texture_idx: u32) {
12422 let needs_new = self.draw_calls_3d.is_empty()
12423 || self.draw_calls_3d.last().unwrap().texture_idx != texture_idx;
12424 if needs_new {
12425 self.draw_calls_3d.push(DrawCall3D {
12426 texture_idx,
12427 index_start: self.indices_3d.len() as u32,
12428 });
12429 }
12430 }
12431
12432 pub fn set_texture_3d(&mut self, texture_idx: u32) {
12433 self.current_texture_3d = texture_idx;

Callers 6

draw_cubeMethod · 0.80
draw_sphereMethod · 0.80
draw_cylinderMethod · 0.80
draw_planeMethod · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected