I'm working on drawing a wasm gauge on top of a javascript gauge to provide additional symbology to Bing maps. I haven't discovered a way to clear the draw buffer in webassembly with the gauge api when using nanovg. I've tried using the low level api function FSRenderFlush with the context provided by the gauge_callback before calling nvgCreateInternal, but that always ends up crashing the game.
When just displaying a wasm gauge, the solution would be to call nvgFill with a black nvgFillColor on every PRE_DRAW, but that just completely hides the javascript gauge behind it.
I've gone as far as creating a custom WasmInstrument class so I could set the opacity of the wasm gauge to 0.5, which partly works, but when the map becomes cluttered, or when displaying something white, it overpowers the wasm gauge.
I understand my use-case is kind of one-off, but I think having access to clear the draw buffer could have many benefits for people using the gauge api.