Glvisualize view method being overwritten

Installation of the package went smoothly, so I think that it’s installed correctly.
I tried running the sinfun example, using include(“sinfun.jl”) while in the repl, for glvisualize and it get the following error:

WARNING: imported binding for scale overwritten in module Main
ERROR: LoadError: MethodError: no method matching view(::GLAbstraction.Context{GLAbstraction.DeviceUnit}, ::GLWindow.Screen)

Strangely when I look for view in the documentation I can’t seem to find it. I then tried the Linesegments3D example and got an error that view does not accept keywords.
Are the examples just out of date ?

Any help appreciated.

Here’s the actual code, which comes from the glvisualize documentation:



window = glscreen()
timesignal = bounce(linspace(0f0,1f0,360))

t = const_lift(*, timesignal, 20pi)
n = 50
const yrange = linspace(0.03, 0.3, n)
trange = linspace(0, 10pi, 200)

function gen_points(timesignal, y)
    x = sin(timesignal+(y*60*pi*y)+y)*y*5
    z = cos((timesignal+pi)+(y*60*pi*y)+y)*y*5
    Point3f0(x,y*60f0,z)
end
function gen_points(timesignal)
    Point3f0[gen_points(timesignal, y) for y in yrange]
end

positions = map(gen_points, t)
scale     = map(Vec3f0, linspace(0.05, 0.6, n))
primitive = centered(Sphere)
color     = map(RGB{Float32}, colormap("RdBu", n))
points    = visualize((primitive, positions), scale=scale, color=color)

view(points, window)

renderloop(window)

Good grief.

view has been replaced by _view.

Found it in the git issues list, under “minor” bug.

I’m sorry about that! I should really update that website!

I bet Simon would appreciate a documentation pull request. A developer like Simon, with many packages and a big agenda, sometimes has a hard time keeping everything in sync without a little help; outside eyes can more easily spot problems.

2 Likes

I would be happy to, but first I’ll have to learn what a pull request is and how to do it.
I need to learn because I’d really like to contribute to the DSP package.
I’ve been using git, but i’m still a git noob for the most part.

1 Like