In the meantime, here are demos using the desktop GL wrapper, and closure 
turned off (only tested on OSX with Intel HD4000 so far):

emscripten: http://floooh.github.io/oryol/Instancing.html
pnacl: http://floooh.github.io/oryol/Instancing_pnacl.html

The instance data buffer is updated once per frame using GL_STREAM_DRAW and 
buffer orphaning. It looks like this update is slower on Firefox OSX 
compared to Chrome, but it might be that Chrome only looks faster because 
it sends all GL commands to another process and I'm only measuring the 
send, not sure about that.

And here the same without instancing (one uniform update and one draw per 
cube, and only 1 cube emitted per frame instead of 10):

emscripten: http://floooh.github.io/oryol/DrawCallPerf.html
pnacl: http://floooh.github.io/oryol/DrawCallPerf_pnacl.html

Am Mittwoch, 9. Juli 2014 22:55:47 UTC+2 schrieb Floh:
>
> Hi,
>
> just noticed this and wrote a ticket: 
> https://github.com/kripken/emscripten/issues/2510
>
> Since most (all?) browser have now implemented this extension it would be 
> nice to have this also in the GLES2 wrapper (it seems to be implemented in 
> the desktop GL wrapper).
>
> Results in PNaCl looks quite promising (WebGL should be similar): I can go 
> up to >65k instanced draws instead of ~6k non-instanced draws before 
> dropping below 60fps.
>
> Even then it looks like the dynamic vertex buffer update for the instance 
> data is the problem (I'm using buffer orphaning, but the transferred data 
> becomes quite big, 16 bytes per instance, so at 65k draws this would be 
> >1MByte dynamic vertex data transferred per frame), so the numbers would 
> very likely be higher if the instance data is static.
>
> Cheers!
> -Floh.
>

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