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

Function bloom_load_render_texture

native/tvos/src/lib.rs:3372–3388  ·  view source on GitHub ↗
(width: f64, height: f64)

Source from the content-addressed store, hash-verified

3370// Q1: Render texture FFI — create GPU textures for render-to-texture.
3371#[no_mangle]
3372pub extern "C" fn bloom_load_render_texture(width: f64, height: f64) -> f64 {
3373 let w = width as u32;
3374 let h = height as u32;
3375 let eng = engine();
3376 let rt_handle = eng.textures.load_render_texture(w, h);
3377
3378 // Create the GPU texture via the renderer's public method.
3379 let (bind_group_idx, _tex_vec_idx) = eng.renderer.create_render_texture(w, h);
3380
3381 // Register as a texture handle so drawTexture can sample it.
3382 let tex_handle = eng.textures.textures.alloc(bloom_shared::textures::TextureData {
3383 bind_group_idx, width: w, height: h,
3384 });
3385 eng.textures.set_render_texture_handle(rt_handle, tex_handle);
3386
3387 rt_handle
3388}
3389
3390#[no_mangle]
3391pub extern "C" fn bloom_unload_render_texture(handle: f64) {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected