Created
April 19, 2017 11:21
-
-
Save hb3p8/d8c6f48a0eb9f5c882eac33dd852a6af to your computer and use it in GitHub Desktop.
getBufferSubData for Emscripten
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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