Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Expected spped of WGLMakie ? #87

Open
LaurentPlagne opened this issue Feb 2, 2021 · 0 comments
Open

Expected spped of WGLMakie ? #87

LaurentPlagne opened this issue Feb 2, 2021 · 0 comments

Comments

@LaurentPlagne
Copy link

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 ?

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…

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant