Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
getBufferSubData for Emscripten
int size = ...
void* data = new char[size];
EM_ASM_(
{
Module.ctx.getBufferSubData(Module.ctx.ARRAY_BUFFER, 0, HEAPU8.subarray($0, $0 + $1));
}, data, size);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment