3 ms·
I use them in a Vulkan API for node.js to handle 64bit interopability when mapping Vulkan memory. Mapping Vulkan memory returns you a numeric address to the mem
by Schampu 8y ago
I use them in a Vulkan API for node.js to handle 64bit interopability when mapping Vulkan memory. Mapping Vulkan memory returns you a numeric address to the memory region. To handle the address I use BigInt, which can then be used to create an ArrayBuffer as a direct JS-side memory view where you can write e.g. your texture data into. See [0] how its used on node-side and [1] the C++ implementation using the V8 API
[0] https://github.com/maierfelix/node-vulkan/blob/master/examples/cube/buffer.mjs#L1-#L7 https://github.com/maierfelix/node-vulkan/blob/master/exampl...
[1] https://github.com/maierfelix/node-vulkan/blob/master/generated/1.1.85/src/index.cpp#L21-#L34 https://github.com/maierfelix/node-vulkan/blob/master/genera...