emscripten-core / emscripten-core/emscripten
Emscripten pre-enabling vbo 0 and 1.
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
**Version of emscripten/emsdk:**
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.25 (febd44b21ecaca86e2cb2a25ef3ed4a0a2076365)
clang version 16.0.0 (https://github.com/llvm/llvm-project effd75bda4b1a9b26e554c1cda3e3b4c72fa0aa8)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/g/emsdk/upstream/bin
Using WebGL via SDL, it would seem emscripten is pre-enabling vertex buffers 0 and 1 before my application code executes, this means when I use a shader that only takes one vbo it will return the error that vbo 1 has no data bound to it.
Emscripten pre-enables these buffers using the `emscripten_glEnableVertexAttribArray()` function in index.js where as my compiled application uses `_glEnableVertexAttribArray()`.
Please refer to the example: https://beverlycode.github.io/ at this repo https://github.com/BeverlyCode/beverlycode.github.io
Contributor guide
Assessment
This issue has not been assessed yet.