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

Function bloom_load_render_texture

native/ios/src/lib.rs:2670–2686  ·  view source on GitHub ↗
(width: f64, height: f64)

Source from the content-addressed store, hash-verified

2668
2669#[no_mangle]
2670pub extern "C" fn bloom_load_render_texture(width: f64, height: f64) -> f64 {
2671 let w = width as u32;
2672 let h = height as u32;
2673 let eng = engine();
2674 let rt_handle = eng.textures.load_render_texture(w, h);
2675
2676 // Create the GPU texture via the renderer's public method.
2677 let (bind_group_idx, _tex_vec_idx) = eng.renderer.create_render_texture(w, h);
2678
2679 // Register as a texture handle so drawTexture can sample it.
2680 let tex_handle = eng.textures.textures.alloc(bloom_shared::textures::TextureData {
2681 bind_group_idx, width: w, height: h,
2682 });
2683 eng.textures.set_render_texture_handle(rt_handle, tex_handle);
2684
2685 rt_handle
2686}
2687
2688#[no_mangle]
2689pub extern "C" fn bloom_unload_render_texture(handle: f64) {

Callers 1

loadRenderTextureFunction · 0.50

Calls 5

load_render_textureMethod · 0.80
create_render_textureMethod · 0.80
allocMethod · 0.80
engineFunction · 0.70

Tested by

no test coverage detected