summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-05-26 20:08:14 -0400
committerLLLL Colonq <llll@colonq>2026-05-26 20:08:14 -0400
commitd6a6caa5c52e3c9be775c269b8d221fd2f13f744 (patch)
tree13495bb0c73d39ab9a19932c86d6007aff17beae /crates
parentdf6dde704893e98c1899dc8f47fbbb87b7551fca (diff)
Fix mesh on wasm32
Diffstat (limited to 'crates')
-rw-r--r--crates/teleia/src/mesh.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/teleia/src/mesh.rs b/crates/teleia/src/mesh.rs
index 536058d..b41e36d 100644
--- a/crates/teleia/src/mesh.rs
+++ b/crates/teleia/src/mesh.rs
@@ -9,12 +9,14 @@ pub const ATTRIB_JOINT: u32 = 3;
pub const ATTRIB_WEIGHT: u32 = 4;
pub const ATTRIB_COLOR: u32 = 5;
+type Buffer = <glow::Context as glow::HasContext>::Buffer;
+
pub struct Mesh {
pub vao: glow::VertexArray,
- pub vbo_vertex: glow::NativeBuffer,
- pub vbo_index: glow::NativeBuffer,
- pub vbo_normal: Option<glow::NativeBuffer>,
- pub vbo_texcoord: Option<glow::NativeBuffer>,
+ pub vbo_vertex: Buffer,
+ pub vbo_index: Buffer,
+ pub vbo_normal: Option<Buffer>,
+ pub vbo_texcoord: Option<Buffer>,
pub mode: u32, // glow::TRIANGLES, etc.
pub index_count: usize,
pub index_type: u32, // glow::BYTE, glow::FLOAT, etc.