drawMesh

actual fun DrawScope.drawMesh(mesh: TriangleMesh, blendMode: BlendMode)

Android's triangle call, with a way round the versions that cannot use it.

Before Android 10 a hardware accelerated canvas silently ignored this call, which is every canvas Compose draws on. Those versions get the triangles one at a time as filled paths, each in the mean colour of its three corners. Slower and flatter: a soft spot becomes a flat disc a third as strong, which holds the light of the fade it stands for.

expect fun DrawScope.drawMesh(mesh: TriangleMesh, blendMode: BlendMode = BlendMode.SrcOver)

Draws every triangle in mesh in one call, in the order they were added.

Later triangles are laid over earlier ones, so add the far ones first. blendMode decides how the whole batch lands on what is already there: the default covers it, and BlendMode.Plus adds light, which is what a glowing surface in a feedback loop wants.

actual fun DrawScope.drawMesh(mesh: TriangleMesh, blendMode: BlendMode)

Desktop and iOS, straight through Skia's own triangle call.