I need a similar thing and I tried to follow your and Floh's advice, but I hope you guys can clarify a bit.
I understand that under core profile I need to create at least one VAO. Would that also be the case under Emscripten? I suppose not. Secondly, and I haven't yet tried to run this on Emscripten, but on Mac if I try to use a legacy profile (as to not require VAOs), it seems the glVertexAttribDivisor is no longer supported. This, possibly, is not critical, because I only use it for debug draw like drawing vertex normals. So, what's the right way for all this to work? My guess is: - Under Emscripten: create a legacy profile, don't use VAOsl, disable debug draw for lack of glVertexAttribDivisor; - Otherwise: create core profile, create/bind a global VAO, which allows glVertexAttribDivisor use in debug draw. Right? On Wednesday, February 20, 2019 at 4:19:30 AM UTC-8, Gabriel CV wrote: > > I agree with Floh on VAO usage, this is not as useful as it sounds :) > > (caution: this is not to be confused with VBOs). > > > However, if you really want some examples with VAOs, there is a few in the > Emscripten test cases. Do a search for "glGenVertexArrays" in > emscripten/test folder, you'll get results such as "cubegeom_pre_vao.c". > Note that VAO are only really supported with WebGL2 (eg. compilation option > "-s USE_WEBGL2=1"), as WebGL1 support will depend on an extension. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
