Closed bsansouci closed 7 years ago
I'll try and fix the flush logic and see if that helps the crash. The slowdown may be unavoidable... There might be some faster way to do ellipse stroke that we can investigate. Have some ideas.
I just tried to fix this flush crash with 8b76a6a699486d886214fc16ffa44ca0c16305a3. Lmk if it helps?
Is that the right number of vertices? I remember spending some time making sure that math was right lol
xD arcstroke uses 2x the vertices of arc. Both might be a little off now. I'll go double check them later.
Perfwise: If we switch our shaders to handle rendering bezier shapes on the GPU then we can approximate a circle using far fewer vertices. http://wdobbie.com/post/gpu-text-rendering-with-vector-textures/ http://http.developer.nvidia.com/GPUGems3/gpugems3_ch25.html
It could also be as simple as doing a pass with a profiler and cleaning up some calculations.
It's also possible that we're rendering way more triangles than we need and they would look good with fewer triangles + AA.
Going to let this issue be tracked with #24
When I comment out
noStroke env
for the rain demo, I get a big slowdown and eventually anFatal error: exception Invalid_argument("index out of bounds")
(only on native, and web just happily continues but at a low framerate).