Skip to main content

Crate glemu

Crate glemu 

Source
Expand description

WebGL2 shim bindings for wasm32-unknown-unknown.

glemu keeps Emscripten-style integer object IDs mapped to web_sys WebGL objects, exposes proc-address lookup helpers for proc-table driven GL consumers, and provides a typed Context API for direct WebGL2 use.

Public API:

Feature flags:

  • api: enables the typed Context API
  • raw-proc: enables proc-table lookup via get_proc_address
  • image-data: enables ImageData texture upload helpers
  • dom-uploads: enables ImageBitmap / canvas / image / video upload helpers
  • video-frame: enables VideoFrame upload helpers

Disable default features and opt back in selectively to reduce web-sys surface area in consumer wasm binaries.

The raw implementation modules are internal details.

See examples/wasm-pack-demo for a minimal browser demo built with wasm-pack.

Structs§

Buffer
Context
ContextId
Framebuffer
Program
Query
Renderbuffer
Sampler
Shader
Texture
TransformFeedback
VertexArray

Functions§

current_context_id
drop_gl_context
get_proc_address
register_gl_context
set_gl_context