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

Method draw_texture_rec

native/shared/src/renderer/mod.rs:11988–12002  ·  view source on GitHub ↗
(
        &mut self, bind_group_idx: u32,
        src_x: f64, src_y: f64, src_w: f64, src_h: f64,
        dst_x: f64, dst_y: f64,
        tint_r: f64, tint_g: f64, tint_b: f64, tint_a: f64,
    )

Source from the content-addressed store, hash-verified

11986 }
11987
11988 pub fn draw_texture_rec(
11989 &mut self, bind_group_idx: u32,
11990 src_x: f64, src_y: f64, src_w: f64, src_h: f64,
11991 dst_x: f64, dst_y: f64,
11992 tint_r: f64, tint_g: f64, tint_b: f64, tint_a: f64,
11993 ) {
11994 let (tw, th) = self.texture_sizes.get(bind_group_idx as usize).copied().unwrap_or((0, 0));
11995 if tw == 0 { return; }
11996 let color = Self::color_to_f32(tint_r, tint_g, tint_b, tint_a);
11997 let u0 = src_x as f32 / tw as f32;
11998 let v0 = src_y as f32 / th as f32;
11999 let u1 = (src_x + src_w) as f32 / tw as f32;
12000 let v1 = (src_y + src_h) as f32 / th as f32;
12001 self.draw_textured_quad(dst_x as f32, dst_y as f32, src_w as f32, src_h as f32, u0, v0, u1, v1, color, bind_group_idx);
12002 }
12003
12004 pub fn draw_texture_pro(
12005 &mut self, bind_group_idx: u32,

Callers 7

bloom_draw_texture_recFunction · 0.80
bloom_draw_texture_recFunction · 0.80
bloom_draw_texture_recFunction · 0.80
bloom_draw_texture_recFunction · 0.80
bloom_draw_texture_recFunction · 0.80
bloom_draw_texture_recFunction · 0.80
bloom_draw_texture_recFunction · 0.80

Calls 2

draw_textured_quadMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected