What sort of errors are you getting?

In WebGL1, vertex array objects are behind an extension 
(OES_vertex_array_object), and depending on how you're setting up the WebGL 
context you may need to manually enable extensions (in 
emscripten_webgl_create_context() this happens automatically though unless 
you set the enableExtensionsByDefault explicitly to false, I'm not sure how 
it works in the GLFW-, SDL- or other wrappers).

Having said that, I'm not using vertex array objects any longer in my code 
since I haven't seen any advantages on any platform, and the fact that the 
buffer bindings are part of the VAO state make them a hassle to use when 
there's a lot of buffer binding combinations. Instead I've put the granular 
vertex declaration calls behind a 'redundant state cache'.

In WebGL2/GLES3 or desktop GL core profile at least a single global VAO is 
required though, for this I simply have a call to glGenVertexArrays() 
followed by a glBindVertexArray() in my GL initialization code.

Cheers,
-Floh.

On Tuesday, 19 February 2019 20:29:35 UTC+1, buggabugga wrote:
>
> Hello,
>
> I haven't been able make VAO work with emscripten or find a complete 
> example that works with emscripten.
>
> Is it supported and if yes can someone point me to a working example?
>
> Thanks!
>

-- 
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.

Reply via email to