Reputation: 483
I'd like to use WebGL Extensions from within Rust code that is compiled to WebAssembly. The web_sys::WebGlRenderingContext
has a method get_extension
which returns a JsValue
.
I expect there is a way to either use the dyn_into
method to get an ANGLE_instanced_arrays
interface, which according to this webidl may be included in web_sys
somewhere, but I can't seem to get at it. If it's not possible to get to the ANGLE_instanced_arrays
interface, is it possible to call known methods and properties using the JsValue
directly?
Upvotes: 0
Views: 675
Reputation: 483
As per this issue: wasm-bindgen issue 893 - Figure out how to support interfaces with NoInterfaceObject
attribute The WebGL extensions should be available in the next release.
Upvotes: 0
Reputation: 81
I noticed that you also posted your question on the wasm-bindgen issues log where they provided some useful information. For other people who come across this I thought I would share the link.
https://github.com/rustwasm/wasm-bindgen/issues/1257
Upvotes: 1