Git Product home page Git Product logo

Comments (23)

SimonDanisch avatar SimonDanisch commented on September 26, 2024

Well this is sort of to expected, since the units are in pixels.
Have you tried rand(Point2f0, -500f0:eps(Float32):500f0) ?
It should be okay in the testsuite, though. Can you attach a screenshot?

from glvisualize.jl.

CarloLucibello avatar CarloLucibello commented on September 26, 2024

thank you for helping out

Have you tried rand(Point2f0, -500f0:eps(Float32):500f0) ?

the same happens

Here is tests' screenshot, see those empty spaces
glvisualize_002

How do you translate the camera btw? I can only rotate and zoom

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

Oh wait, I think I've seen that bug.
Can you try to replace the call to glscreen with this:

w,r = glscreen(debugging=true)

Also, this might be fixed in the next2 branch.
If you wish, I can look what packages you will need to checkout.
It should be somethin like:

Pkg.checkout("GLVisualize", "next2")
Pkg.checkout("GLAbstraction", "sd/next²")
Pkg.checkout("GeometryTypes", "sd/typealias")
Pkg.checkout("FixedSizeArrays")
Pkg.checkout("GLWindow")

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

The middle mouse button gives you translate... I'll need to rework the camera, since a lot of people don't actually use a mouse with a middle button...

from glvisualize.jl.

CarloLucibello avatar CarloLucibello commented on September 26, 2024

I tried the debugging option but it didń't print any additional information

on the branch next2 my script yields this
glvisualize_002
Now I have one single triangle and a change in the camera mode (from orthogonal to perspective I think)

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

Can you try runtest.jl?

from glvisualize.jl.

CarloLucibello avatar CarloLucibello commented on September 26, 2024

glvisualize_003

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

Great, this looks like it should be fixed :)
Try

using GLVisualize, GeometryTypes
w, r = glscreen()
s = Vec2f0(100)
N = 10
points = Point2f0[Point2f0(x,0f0) for x=linspace(0, N*s[1], N)]
v = visualize(points, scale=s)
#v = visualize((Circle(Point2f0(0), scale[1]), points))
view(v, method=:orthographic_pixel) #it's actually a bug that you need to define the method.
r()

from glvisualize.jl.

CarloLucibello avatar CarloLucibello commented on September 26, 2024

nice, it works!

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

Awesome, thanks for trying this out! I'll leave this open until next2 is merged!

from glvisualize.jl.

ashleylid avatar ashleylid commented on September 26, 2024

Hi - is this still open? I get an error when running the test:

ERROR: LoadError: ArgumentError: StructsOfArrays not found in path

I am rendering in a loop and would like to clear the screen re-rendering in the same window, is there an easy way to do that? Because with every render the loop slows.

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

So are you on the next branch?
I've updated the README in that branch. It now contains all the packages you need.
Note, that I just pushed some changes to the ArraysOfStructs fork, which are not compatible yet -.-
You need to be on this commit:
JuliaArrays/StructsOfArrays.jl#3
SimonDanisch/StructsOfArrays.jl@333e5f5

from glvisualize.jl.

ashleylid avatar ashleylid commented on September 26, 2024

I need the sd/screenbuffer so have just been merging with master. When I am on either branch of GLVisualize:

Pkg.test("GLVisualize")
INFO: Computing test dependencies for GLVisualize...
INFO: No packages to install, update or remove
INFO: Testing GLVisualize
surface
Barplot
3d dot particles
some more funcitonality from Meshes
particles
sierpinski
vectorfielddata
volume_data
ERROR: LoadError: LoadError: syntax: "<<" is not a unary operator

I was just running the test file out of interest, to make sure everything was working. But my origional quest was just to find a way to clear the window before rerunning my loop. I found this: empty!(w.renderlist) but it doesnt seem to do anything.. ie the render slows with every iteration. Which hurts after 1000 renders - just crashes.

I dont want to bog you down with stuff thats not that important, although it would be nice to fix what the problem is - what branch should I be on?

from glvisualize.jl.

ashleylid avatar ashleylid commented on September 26, 2024

Which branch should I be on? I am a little further along with the test something about << not being a unary operator - but I put this on another issue..

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

I fixed the StructsOfArray thing, so you should be able to simply be on what the readme in next2 says:
https://github.com/JuliaGL/GLVisualize.jl/tree/next2 (If you don't want to be on the tagged version)...

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

This should also include the screenshot function.. It got moved to GLWindow though: https://github.com/JuliaGL/GLWindow.jl/blob/sd/rebuild/src/screen.jl#L231

from glvisualize.jl.

ashleylid avatar ashleylid commented on September 26, 2024

Ok..

Following the above, my branches are as expected in the list https://github.com/JuliaGL/GLVisualize.jl/tree/next2. Not too worried about version, just as long as everything works :)

I did however run into a snag with glscreen()

LoadError: ArgumentError: function glscreen does not accept keyword arguments
from:

w, r = glscreen(resolution = (width, height)); 

I see that now you call it using Screen, so I have:

w, r = Screen(resolution = (width, height));

and I get the error

WARNING: program 1 not linked. Error in:
~/.julia/v0.4/GLWindow/src/fxaa.vert or
~/.julia/v0.4/GLWindow/src/fxaa.frag or
~/.julia/v0.4/GLWindow/src/fxaa_combine.frag

LoadError: Named attribute (:texturecoordinates) is not an active attribute in the specified program object or

        the name starts with the reserved prefix gl_

while loading In[15], in expression starting on line 27

in get_attribute_location at /home/ashley/.julia/v0.4/GLAbstraction/src/GLExtendedFunctions.jl:30
in call at ~/.julia/v0.4/GLAbstraction/src/GLTypes.jl:154
in call at ~/.julia/v0.4/GLAbstraction/src/GLTypes.jl:216
in postprocess at ~/.julia/v0.4/GLWindow/src/types.jl:32
in call at ~/.julia/v0.4/GLWindow/src/types.jl:55
in Screen at ~/.julia/v0.4/GLWindow/src/screen.jl:272
in Screen at ~/.julia/v0.4/GLWindow/src/screen.jl:237

Running it again not changing anything I get:

LoadError: MethodError: start has no method matching start(::GLWindow.Screen)
while loading In[2], in expression starting on line 27

So I swapped back to sd/screenbuffer (from next2) and its giving me:

LoadError: UndefVarError: createwindow not defined

So all in all everything seems like its not working.. And I am really sorry to be the bearer or bad news not knowing enough to go and fix it myself..

Am I on the right issue? should we move this somewhere else?

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

You're not on the right issue, if you actually try to get next2 running in order to get the point rendering running.

LoadError: MethodError: start has no method matching start(::GLWindow.Screen)

This is to be expected, if you haven't changed your example code in this way:

# old API
window, renderloop = glscreen()

# new API
window = glscreen()

GLWindow.renderloop(window) # renderloop is also exported by GLVisualize

from glvisualize.jl.

ashleylid avatar ashleylid commented on September 26, 2024

Hi,

I am still getting errors, most likely to do with my understanding of the syntax. Going back to your examples - how do these change with the new methods:

https://github.com/JuliaGL/GLVisualize.jl/blob/master/examples/camera.jl (I have looked at https://github.com/JuliaGL/GLVisualize.jl/blob/next2/examples/camera/camera2.jl)
https://github.com/JuliaGL/GLVisualize.jl/blob/master/examples/rotate_robj.jl

Like how to I now set my resolution? And the camera set up has also changed, but I am failing at getting it working again. And now I am struggling to revert. So not generating my depth images anymore :(

And my errors are going nuts with types..

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

And my errors are going nuts with types..

What does that even mean?

Well, I'll very soon release a new suite of examples with videos and comments and everything. Right now I'm actually nearly done with the camera rebuild, so the camera example should be outdated on next2. I wouldn't recommend working on the next2 branch right now!

from glvisualize.jl.

ashleylid avatar ashleylid commented on September 26, 2024

Ok.. I get that updating things while in progress is not a good idea.. hopefully I can get everything to go back to when it was working..

To get to where I am I did this:

Pkg.checkout("GLAbstraction", "sd/next²")
Pkg.checkout("GLVisualize", "next2")
Pkg.checkout("GLWindow", "sd/rebuild")
Pkg.checkout("GeometryTypes", "sd/boundingbox")
Pkg.checkout("FixedSizeArrays", "master")

Now I swapped back to Pkg.checkout("GLVisualize", "sd/screenbuffer")
and I get this error LoadError: UndefVarError: createwindow not defined when running this line w = glscreen() and when I go right back to w,r=glscreen(resolution = (width, height)) I get that glscreen does not take arguments and the same createwindow error..

EDIT: I reverted everything, all tagged versions.. and now its working like before - phew.. It still slows down with every loop even though I do empty!(w.renderlist)

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

Is there a particular reason why you need to be on the next2 set of branches? Does the tagged version not work for you?

from glvisualize.jl.

ashleylid avatar ashleylid commented on September 26, 2024

Nope - was just being pedantic and trying to get the test working.. but I don't need to have my cake and eat it.

from glvisualize.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.