Expected speed of WGLMakie

Hi,

I wonder what is the expected speed of WGLMakie compared to GLMakie. The following MWE takes 20s with WGLMakie compared to 0.8s using GLMakie.
Is is expected ? Could someone explain the difference ?

MWE
using GLMakie,AbstractPlotting
function MWE()
    scene = Scene()
    nh=50
    nx=200
    ny=200
    xs = LinRange(0, 10.0, nx)
    ys = LinRange(0, 15.0, ny)

    zs=zeros(nx,ny)

    function updatezs!(t)
        for j in eachindex(ys)
            for i in eachindex(xs)
                zs[i,j] = cos(xs[i]+t) * sin(ys[j]+2t)
            end
        end
    end


    zn = Node(zs)
    # heatmap!(scene,xs,ys,lift(z->z,zn),camera = cam2d!)
    surface!(scene,xs, ys, lift(z->z,zn),camera = cam3d!)
    display(scene)
    t=0
    for j in 1:nh
        t+=0.1
        updatezs!(t)
        sleep(0.01)
        zn[] = zs 
        yield()
    end
end 

In addition, the GLMakie plots are prettier…

Thanks

3 Likes