@bornengine/engine 0.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +231 -0
- package/native/android/Cargo.lock +1848 -0
- package/native/android/Cargo.toml +24 -0
- package/native/android/src/lib.rs +702 -0
- package/native/ios/Cargo.lock +1690 -0
- package/native/ios/Cargo.toml +32 -0
- package/native/ios/src/lib.rs +1267 -0
- package/native/linux/Cargo.lock +3279 -0
- package/native/linux/Cargo.toml +29 -0
- package/native/linux/src/lib.rs +1331 -0
- package/native/macos/Cargo.lock +3310 -0
- package/native/macos/Cargo.toml +46 -0
- package/native/macos/src/lib.rs +1302 -0
- package/native/shared/Cargo.lock +1899 -0
- package/native/shared/Cargo.toml +62 -0
- package/native/shared/assets/default_font.ttf +0 -0
- package/native/shared/build.rs +270 -0
- package/native/shared/shaders/common/clouds.wgsl +122 -0
- package/native/shared/shaders/common/fog.wgsl +16 -0
- package/native/shared/shaders/common/foliage_wind.wgsl +98 -0
- package/native/shared/shaders/common/imposter.wgsl +112 -0
- package/native/shared/shaders/common/pbr.wgsl +186 -0
- package/native/shared/shaders/common/shadows.wgsl +186 -0
- package/native/shared/shaders/common/sky.wgsl +8 -0
- package/native/shared/shaders/common/tonemap.wgsl +25 -0
- package/native/shared/shaders/impulse_field.wgsl +57 -0
- package/native/shared/shaders/material_abi.wgsl +383 -0
- package/native/shared/shaders/materials/test_minimal.wgsl +42 -0
- package/native/shared/src/anim_mixer.rs +61 -0
- package/native/shared/src/attach.rs +263 -0
- package/native/shared/src/audio/decode.rs +123 -0
- package/native/shared/src/audio/mod.rs +863 -0
- package/native/shared/src/audio/render.rs +892 -0
- package/native/shared/src/audio/spsc.rs +156 -0
- package/native/shared/src/audio/stream.rs +226 -0
- package/native/shared/src/custom_shaders.rs +104 -0
- package/native/shared/src/decals.rs +245 -0
- package/native/shared/src/drs.rs +211 -0
- package/native/shared/src/engine.rs +261 -0
- package/native/shared/src/ffi.rs +116 -0
- package/native/shared/src/ffi_core/assets.rs +388 -0
- package/native/shared/src/ffi_core/audio_ffi.rs +184 -0
- package/native/shared/src/ffi_core/draw.rs +334 -0
- package/native/shared/src/ffi_core/game_loop.rs +577 -0
- package/native/shared/src/ffi_core/input.rs +234 -0
- package/native/shared/src/ffi_core/mod.rs +127 -0
- package/native/shared/src/ffi_core/models.rs +1154 -0
- package/native/shared/src/ffi_core/ragdoll_ffi.rs +261 -0
- package/native/shared/src/ffi_core/scene.rs +626 -0
- package/native/shared/src/ffi_core/vfx.rs +212 -0
- package/native/shared/src/ffi_core/visual.rs +691 -0
- package/native/shared/src/frame_callbacks.rs +122 -0
- package/native/shared/src/geometry.rs +236 -0
- package/native/shared/src/handles.rs +182 -0
- package/native/shared/src/input.rs +448 -0
- package/native/shared/src/jolt_sys.rs +822 -0
- package/native/shared/src/lib.rs +55 -0
- package/native/shared/src/models.rs +1093 -0
- package/native/shared/src/models_gltf.rs +1280 -0
- package/native/shared/src/particles.rs +391 -0
- package/native/shared/src/physics_jolt.rs +1908 -0
- package/native/shared/src/picking.rs +298 -0
- package/native/shared/src/postfx.rs +345 -0
- package/native/shared/src/profiler.rs +492 -0
- package/native/shared/src/ragdoll.rs +474 -0
- package/native/shared/src/renderer/atmosphere_lut.rs +573 -0
- package/native/shared/src/renderer/brdf_lut.rs +154 -0
- package/native/shared/src/renderer/draw2d.rs +143 -0
- package/native/shared/src/renderer/formats.rs +822 -0
- package/native/shared/src/renderer/froxel.rs +421 -0
- package/native/shared/src/renderer/gi_bake.rs +653 -0
- package/native/shared/src/renderer/graph.rs +462 -0
- package/native/shared/src/renderer/hiz.rs +269 -0
- package/native/shared/src/renderer/hot_reload.rs +390 -0
- package/native/shared/src/renderer/impulse_field.rs +456 -0
- package/native/shared/src/renderer/lighting.rs +154 -0
- package/native/shared/src/renderer/material_instancing.rs +171 -0
- package/native/shared/src/renderer/material_pipeline.rs +700 -0
- package/native/shared/src/renderer/material_system.rs +1996 -0
- package/native/shared/src/renderer/material_system_tests.rs +601 -0
- package/native/shared/src/renderer/material_system_wasm.rs +41 -0
- package/native/shared/src/renderer/mod.rs +12556 -0
- package/native/shared/src/renderer/model_draw.rs +641 -0
- package/native/shared/src/renderer/occlusion.rs +429 -0
- package/native/shared/src/renderer/planar_pass.rs +593 -0
- package/native/shared/src/renderer/planar_reflection.rs +499 -0
- package/native/shared/src/renderer/post_pass.rs +249 -0
- package/native/shared/src/renderer/postfx_chain.rs +728 -0
- package/native/shared/src/renderer/pt_pass.rs +577 -0
- package/native/shared/src/renderer/scene_pass.rs +607 -0
- package/native/shared/src/renderer/shader_include.rs +205 -0
- package/native/shared/src/renderer/shader_library.rs +135 -0
- package/native/shared/src/renderer/shaders/ao.rs +570 -0
- package/native/shared/src/renderer/shaders/core.rs +1243 -0
- package/native/shared/src/renderer/shaders/env.rs +907 -0
- package/native/shared/src/renderer/shaders/gi.rs +810 -0
- package/native/shared/src/renderer/shaders/mod.rs +19 -0
- package/native/shared/src/renderer/shaders/post.rs +1558 -0
- package/native/shared/src/renderer/shaders/pt.rs +1859 -0
- package/native/shared/src/renderer/shaders/ssgi.rs +1586 -0
- package/native/shared/src/renderer/shadow_pass.rs +731 -0
- package/native/shared/src/renderer/ssgi_pass.rs +392 -0
- package/native/shared/src/renderer/ssr_pass.rs +188 -0
- package/native/shared/src/renderer/texture_store.rs +473 -0
- package/native/shared/src/renderer/transient.rs +591 -0
- package/native/shared/src/renderer/types.rs +941 -0
- package/native/shared/src/renderer/util.rs +152 -0
- package/native/shared/src/scene.rs +1362 -0
- package/native/shared/src/sdf_cache.rs +274 -0
- package/native/shared/src/shadows.rs +1036 -0
- package/native/shared/src/staging.rs +102 -0
- package/native/shared/src/string_header.rs +266 -0
- package/native/shared/src/text_renderer.rs +502 -0
- package/native/shared/src/textures.rs +197 -0
- package/native/tvos/Cargo.lock +1693 -0
- package/native/tvos/Cargo.toml +36 -0
- package/native/tvos/metal-patched/Cargo.toml +178 -0
- package/native/tvos/metal-patched/LICENSE-APACHE +201 -0
- package/native/tvos/metal-patched/LICENSE-MIT +25 -0
- package/native/tvos/metal-patched/src/acceleration_structure.rs +667 -0
- package/native/tvos/metal-patched/src/acceleration_structure_pass.rs +108 -0
- package/native/tvos/metal-patched/src/argument.rs +366 -0
- package/native/tvos/metal-patched/src/blitpass.rs +102 -0
- package/native/tvos/metal-patched/src/buffer.rs +71 -0
- package/native/tvos/metal-patched/src/capturedescriptor.rs +76 -0
- package/native/tvos/metal-patched/src/capturemanager.rs +113 -0
- package/native/tvos/metal-patched/src/commandbuffer.rs +192 -0
- package/native/tvos/metal-patched/src/commandqueue.rs +44 -0
- package/native/tvos/metal-patched/src/computepass.rs +107 -0
- package/native/tvos/metal-patched/src/constants.rs +152 -0
- package/native/tvos/metal-patched/src/counters.rs +119 -0
- package/native/tvos/metal-patched/src/depthstencil.rs +190 -0
- package/native/tvos/metal-patched/src/device.rs +2134 -0
- package/native/tvos/metal-patched/src/drawable.rs +39 -0
- package/native/tvos/metal-patched/src/encoder.rs +2041 -0
- package/native/tvos/metal-patched/src/heap.rs +281 -0
- package/native/tvos/metal-patched/src/indirect_encoder.rs +344 -0
- package/native/tvos/metal-patched/src/lib.rs +657 -0
- package/native/tvos/metal-patched/src/library.rs +902 -0
- package/native/tvos/metal-patched/src/mps.rs +575 -0
- package/native/tvos/metal-patched/src/pipeline/compute.rs +475 -0
- package/native/tvos/metal-patched/src/pipeline/mod.rs +71 -0
- package/native/tvos/metal-patched/src/pipeline/render.rs +762 -0
- package/native/tvos/metal-patched/src/renderpass.rs +443 -0
- package/native/tvos/metal-patched/src/resource.rs +182 -0
- package/native/tvos/metal-patched/src/sampler.rs +165 -0
- package/native/tvos/metal-patched/src/sync.rs +178 -0
- package/native/tvos/metal-patched/src/texture.rs +352 -0
- package/native/tvos/metal-patched/src/types.rs +90 -0
- package/native/tvos/metal-patched/src/vertexdescriptor.rs +250 -0
- package/native/tvos/src/audio_backend.rs +197 -0
- package/native/tvos/src/lib.rs +1891 -0
- package/native/visionos/Cargo.lock +1693 -0
- package/native/visionos/Cargo.toml +40 -0
- package/native/visionos/src/audio_backend.rs +197 -0
- package/native/visionos/src/lib.rs +1887 -0
- package/native/watchos/Cargo.lock +16 -0
- package/native/watchos/Cargo.toml +19 -0
- package/native/watchos/shaders/bloom_postfx.metal +99 -0
- package/native/watchos/src/BloomWatchApp.swift +1267 -0
- package/native/watchos/src/BloomWatchAudio.swift +179 -0
- package/native/watchos/src/audio.rs +55 -0
- package/native/watchos/src/draw_list.rs +229 -0
- package/native/watchos/src/ffi_stubs.rs +915 -0
- package/native/watchos/src/ffi_stubs_manual.rs +35 -0
- package/native/watchos/src/lib.rs +1124 -0
- package/native/watchos/src/models.rs +746 -0
- package/native/watchos/src/postfx.rs +95 -0
- package/native/watchos/src/scene.rs +534 -0
- package/native/watchos/src/textures.rs +184 -0
- package/native/web/Cargo.lock +1657 -0
- package/native/web/Cargo.toml +43 -0
- package/native/web/bloom_glue.js +695 -0
- package/native/web/build.sh +131 -0
- package/native/web/index.html +35 -0
- package/native/web/jolt_bridge.js +1519 -0
- package/native/web/src/input_ffi.rs +286 -0
- package/native/web/src/lib.rs +1796 -0
- package/native/web/src/material_ffi.rs +710 -0
- package/native/web/src/parity_ffi.rs +343 -0
- package/native/web/src/physics_ffi.rs +643 -0
- package/native/web/src/ragdoll_ffi.rs +250 -0
- package/native/web/src/render_settings.rs +98 -0
- package/native/windows/Cargo.lock +1815 -0
- package/native/windows/Cargo.toml +68 -0
- package/native/windows/src/lib.rs +1486 -0
- package/package.json +4279 -0
- package/src/audio/index.ts +315 -0
- package/src/core/colors.ts +63 -0
- package/src/core/index.ts +1206 -0
- package/src/core/keys.ts +63 -0
- package/src/core/types.ts +104 -0
- package/src/index.ts +171 -0
- package/src/math/index.ts +516 -0
- package/src/mobile/index.ts +294 -0
- package/src/models/index.ts +1258 -0
- package/src/physics/index.ts +1134 -0
- package/src/scene/index.ts +698 -0
- package/src/shapes/index.ts +120 -0
- package/src/text/index.ts +48 -0
- package/src/textures/index.ts +187 -0
- package/src/vfx/index.ts +191 -0
- package/src/world/index.ts +24 -0
- package/src/world/loader.ts +423 -0
- package/src/world/prefab.ts +217 -0
- package/src/world/render.ts +172 -0
- package/src/world/saver.ts +108 -0
- package/src/world/serialize.ts +301 -0
- package/src/world/terrain.ts +355 -0
- package/src/world/types.ts +160 -0
- package/src/world/validate.ts +319 -0
- package/src/world/version.ts +114 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
//! EN-026 particles + EN-027 decals.
|
|
2
|
+
//!
|
|
3
|
+
//! Section of [`define_core_ffi!`](crate::define_core_ffi) — see
|
|
4
|
+
//! `ffi_core/mod.rs` for the architecture and the invoking-crate contract.
|
|
5
|
+
//!
|
|
6
|
+
//! Both subsystems follow the same shape: the engine simulates and owns a
|
|
7
|
+
//! dynamic instance buffer; the game supplies the material + quad mesh and
|
|
8
|
+
//! issues one instanced draw per system. The FFI traffic is therefore
|
|
9
|
+
//! proportional to *events* (a burst, an impact), never to the number of live
|
|
10
|
+
//! particles — which is the whole reason the sim is native (a 2 000-particle
|
|
11
|
+
//! pool pushed float-by-float across the FFI would be ~24 000 calls a frame).
|
|
12
|
+
|
|
13
|
+
#[doc(hidden)]
|
|
14
|
+
#[macro_export]
|
|
15
|
+
macro_rules! __bloom_ffi_vfx {
|
|
16
|
+
() => {
|
|
17
|
+
|
|
18
|
+
// ---- EN-026 particles ------------------------------------------
|
|
19
|
+
|
|
20
|
+
// bloom_particles_create — pool + dynamic instance buffer.
|
|
21
|
+
// Returns a 1-based system handle (0 = failure).
|
|
22
|
+
#[no_mangle]
|
|
23
|
+
pub extern "C" fn bloom_particles_create(capacity: f64) -> f64 {
|
|
24
|
+
$crate::ffi::guard("bloom_particles_create", move || {
|
|
25
|
+
let cap = (capacity as usize).clamp(1, 100_000);
|
|
26
|
+
let mut eng = engine();
|
|
27
|
+
let $crate::engine::EngineState { renderer, particles, .. } = &mut *eng;
|
|
28
|
+
let device = &renderer.device;
|
|
29
|
+
let ib = renderer.material_system.create_dynamic_instance_buffer(
|
|
30
|
+
device, cap as u32);
|
|
31
|
+
particles.create(cap, ib) as f64
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// bloom_particles_configure — behaviour, pushed through the mesh
|
|
36
|
+
// scratch (same idiom as create_instance_buffer_scratch: Perry 0.5.x
|
|
37
|
+
// rejects JS arrays in i64 pointer params). Startup-only, so the
|
|
38
|
+
// per-float call cost does not matter. See particles.rs for the slot
|
|
39
|
+
// order.
|
|
40
|
+
#[no_mangle]
|
|
41
|
+
pub extern "C" fn bloom_particles_configure(sys: f64) {
|
|
42
|
+
$crate::ffi::guard("bloom_particles_configure", move || {
|
|
43
|
+
let mut eng = engine();
|
|
44
|
+
#[cfg(feature = "models3d")]
|
|
45
|
+
{
|
|
46
|
+
let $crate::engine::EngineState { models, particles, .. } = &mut *eng;
|
|
47
|
+
let params: Vec<f32> = models.scratch_f32.clone();
|
|
48
|
+
models.mesh_scratch_reset();
|
|
49
|
+
if let Some(s) = particles.get_mut(sys as u32) {
|
|
50
|
+
s.configure_from_slice(¶ms);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
#[cfg(not(feature = "models3d"))]
|
|
54
|
+
{ let _ = sys; }
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// bloom_particles_emit — one burst. 8 args (the ARM64 ceiling).
|
|
59
|
+
#[no_mangle]
|
|
60
|
+
pub extern "C" fn bloom_particles_emit(
|
|
61
|
+
sys: f64, x: f64, y: f64, z: f64,
|
|
62
|
+
dx: f64, dy: f64, dz: f64, count: f64,
|
|
63
|
+
) {
|
|
64
|
+
$crate::ffi::guard("bloom_particles_emit", move || {
|
|
65
|
+
if let Some(s) = engine().particles.get_mut(sys as u32) {
|
|
66
|
+
s.emit(
|
|
67
|
+
[x as f32, y as f32, z as f32],
|
|
68
|
+
[dx as f32, dy as f32, dz as f32],
|
|
69
|
+
(count as usize).min(4096),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// bloom_particles_update — integrate + upload. Returns the live count,
|
|
76
|
+
// which is what the caller passes as instanceCount to the draw.
|
|
77
|
+
#[no_mangle]
|
|
78
|
+
pub extern "C" fn bloom_particles_update(sys: f64, dt: f64) -> f64 {
|
|
79
|
+
$crate::ffi::guard("bloom_particles_update", move || {
|
|
80
|
+
let mut eng = engine();
|
|
81
|
+
let $crate::engine::EngineState { particles, renderer, .. } = &mut *eng;
|
|
82
|
+
let (live, ib) = match particles.get_mut(sys as u32) {
|
|
83
|
+
Some(s) => (s.update(dt as f32), s.instance_buffer),
|
|
84
|
+
None => return 0.0,
|
|
85
|
+
};
|
|
86
|
+
if live > 0 {
|
|
87
|
+
// Re-borrow: the packed slice and the renderer are disjoint
|
|
88
|
+
// fields, but the borrow checker cannot see that through
|
|
89
|
+
// two method calls.
|
|
90
|
+
let packed: Vec<f32> = match particles.get_mut(sys as u32) {
|
|
91
|
+
Some(s) => s.packed()[..(live as usize) * 12].to_vec(),
|
|
92
|
+
None => return 0.0,
|
|
93
|
+
};
|
|
94
|
+
let queue = &renderer.queue;
|
|
95
|
+
renderer.material_system.update_instance_buffer(
|
|
96
|
+
queue, ib, &packed, live);
|
|
97
|
+
}
|
|
98
|
+
live as f64
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// bloom_particles_instance_buffer — the handle to hand to
|
|
103
|
+
// drawMeshWithMaterialInstanced.
|
|
104
|
+
#[no_mangle]
|
|
105
|
+
pub extern "C" fn bloom_particles_instance_buffer(sys: f64) -> f64 {
|
|
106
|
+
$crate::ffi::guard("bloom_particles_instance_buffer", move || {
|
|
107
|
+
engine().particles.get_mut(sys as u32)
|
|
108
|
+
.map(|s| s.instance_buffer as f64)
|
|
109
|
+
.unwrap_or(0.0)
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
#[no_mangle]
|
|
114
|
+
pub extern "C" fn bloom_particles_clear(sys: f64) {
|
|
115
|
+
$crate::ffi::guard("bloom_particles_clear", move || {
|
|
116
|
+
if let Some(s) = engine().particles.get_mut(sys as u32) { s.clear(); }
|
|
117
|
+
})
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
#[no_mangle]
|
|
121
|
+
pub extern "C" fn bloom_particles_live(sys: f64) -> f64 {
|
|
122
|
+
$crate::ffi::guard("bloom_particles_live", move || {
|
|
123
|
+
engine().particles.get_mut(sys as u32)
|
|
124
|
+
.map(|s| s.live as f64)
|
|
125
|
+
.unwrap_or(0.0)
|
|
126
|
+
})
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// ---- EN-027 decals ---------------------------------------------
|
|
130
|
+
|
|
131
|
+
// bloom_decals_init — ring capacity + its dynamic instance buffer.
|
|
132
|
+
#[no_mangle]
|
|
133
|
+
pub extern "C" fn bloom_decals_init(capacity: f64) -> f64 {
|
|
134
|
+
$crate::ffi::guard("bloom_decals_init", move || {
|
|
135
|
+
let cap = (capacity as usize).clamp(1, 8192);
|
|
136
|
+
let mut eng = engine();
|
|
137
|
+
let $crate::engine::EngineState { renderer, decals, .. } = &mut *eng;
|
|
138
|
+
let device = &renderer.device;
|
|
139
|
+
let ib = renderer.material_system.create_dynamic_instance_buffer(
|
|
140
|
+
device, cap as u32);
|
|
141
|
+
decals.init(cap, ib);
|
|
142
|
+
ib as f64
|
|
143
|
+
})
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// bloom_decals_spawn — position + normal + size + roll. Colour, atlas
|
|
147
|
+
// frame and lifetime come from bloom_decals_set_style, which the caller
|
|
148
|
+
// sets once per decal *type* rather than paying for them on every hit.
|
|
149
|
+
#[no_mangle]
|
|
150
|
+
pub extern "C" fn bloom_decals_spawn(
|
|
151
|
+
x: f64, y: f64, z: f64,
|
|
152
|
+
nx: f64, ny: f64, nz: f64,
|
|
153
|
+
size: f64, roll: f64,
|
|
154
|
+
) {
|
|
155
|
+
$crate::ffi::guard("bloom_decals_spawn", move || {
|
|
156
|
+
engine().decals.spawn_styled(
|
|
157
|
+
[x as f32, y as f32, z as f32],
|
|
158
|
+
[nx as f32, ny as f32, nz as f32],
|
|
159
|
+
size as f32, roll as f32,
|
|
160
|
+
);
|
|
161
|
+
})
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// bloom_decals_set_style — frame, rgba, life, fade for subsequent
|
|
165
|
+
// spawns. 7 args.
|
|
166
|
+
#[no_mangle]
|
|
167
|
+
pub extern "C" fn bloom_decals_set_style(
|
|
168
|
+
frame: f64, r: f64, g: f64, b: f64, a: f64, life: f64, fade: f64,
|
|
169
|
+
) {
|
|
170
|
+
$crate::ffi::guard("bloom_decals_set_style", move || {
|
|
171
|
+
engine().decals.style = $crate::decals::DecalStyle {
|
|
172
|
+
frame: frame as f32,
|
|
173
|
+
color: [r as f32, g as f32, b as f32, a as f32],
|
|
174
|
+
life: life as f32,
|
|
175
|
+
fade: fade as f32,
|
|
176
|
+
};
|
|
177
|
+
})
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
#[no_mangle]
|
|
181
|
+
pub extern "C" fn bloom_decals_update(dt: f64) -> f64 {
|
|
182
|
+
$crate::ffi::guard("bloom_decals_update", move || {
|
|
183
|
+
let mut eng = engine();
|
|
184
|
+
let $crate::engine::EngineState { decals, renderer, .. } = &mut *eng;
|
|
185
|
+
let live = decals.update(dt as f32);
|
|
186
|
+
let ib = decals.instance_buffer;
|
|
187
|
+
if live > 0 {
|
|
188
|
+
let packed: Vec<f32> = decals.packed()[..(live as usize) * 12].to_vec();
|
|
189
|
+
let queue = &renderer.queue;
|
|
190
|
+
renderer.material_system.update_instance_buffer(
|
|
191
|
+
queue, ib, &packed, live);
|
|
192
|
+
}
|
|
193
|
+
live as f64
|
|
194
|
+
})
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
#[no_mangle]
|
|
198
|
+
pub extern "C" fn bloom_decals_instance_buffer() -> f64 {
|
|
199
|
+
$crate::ffi::guard("bloom_decals_instance_buffer", move || {
|
|
200
|
+
engine().decals.instance_buffer as f64
|
|
201
|
+
})
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
#[no_mangle]
|
|
205
|
+
pub extern "C" fn bloom_decals_clear() {
|
|
206
|
+
$crate::ffi::guard("bloom_decals_clear", move || {
|
|
207
|
+
engine().decals.clear();
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
};
|
|
212
|
+
}
|