What can be considered a safe number of triangles/vertexes for a WebGL application to work on recent desktop/notebook machines (say, bought 2009 or after)? I’m worried about memory, not performance. The more vertexes I can send to WebGL, the better looking the scene will be. For some scenes, it would be nice if I could send 30k triangles (some 60k vertexes, due use of triangle strips).
Doing a quick calculation, 60k vertexes means a 60k x vec4, where each vec4 is 4 x 8 bytes (8 because I’m considering a double for each component). So that gives about 1.9mb of vertex memory. Is that safe for most recent WebGL environments?
Should be ok but i more concern about webgl sandboxing limitations. For example Flash has limited amount of buffers and their size, shader instruction amount, only 4 (or 5) render contexts etc. and most likely memory. WebGL much less restrictive but implementation is 1. Browser dependant 2. machine dependant (Google Chrome can run WebGL on DirectX “angle project“) If browser doesn’t has DirectX fallback and machine hasn’t proper OpenGL drivers WebGL wont work. Also there was issues with different implementation of same origins policy for textures. So you can’t just hope that your app will work on any machine. You can’t avoid benchmarking.