I’m trying to use WebGL in Hoot. I’m using define-foreign to get access to js functions. I don’t understand how I’m supposed to get access to webgl constants like COLOR_BUFFER_BIT. I tried something like
That’s a separate but related thing that you could target with the code generation tool. All the Web APIs have IDL specifications, so you can parse those and generate bindings. This is what Kotlin Wasm does. Here is the WebGL IDL file and specifically a line that defines a constant: WebGL/specs/latest/1.0/webgl.idl at main · KhronosGroup/WebGL · GitHub