-
Hi, I would like to recreate this example and this one using c++ and emscripten however the api call for device.importExternalTexture and queue.copyExternalImageToTexture are completely missing from the binding class. This means that we currently cannot load up external images nor video texture within emscripten + webgpu :( how should I proceed? https://austin-eng.com/webgpu-samples/samples/texturedCube |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
cc @kainino0x |
Beta Was this translation helpful? Give feedback.
-
This is an open item, but I'm not exactly sure what the fix is. These APIs require DOM objects to be passed in (which live outside the WASM heap), so need to take something like an For now IIRC the workaround is to use |
Beta Was this translation helpful? Give feedback.
This is an open item, but I'm not exactly sure what the fix is. These APIs require DOM objects to be passed in (which live outside the WASM heap), so need to take something like an
EM_VAL
. But I don't know what the appropriate Emscripten-y way to do this is.For now IIRC the workaround is to use
EM_ASM
to make these calls. It takes a little effort to get the correct objects into JS to be able to do this but it should be possible.