Git Product home page Git Product logo

Comments (15)

SimonDanisch avatar SimonDanisch commented on September 26, 2024

This is a long known bug, which had low priority since I never felt like it's a very important use case.
You can just do empty!(w.renderlist) for example, or restart Julia.
I do see that it's not that satisfying ;)
Bad news is, that I thought I knew what the error was, but after looking into this, it turned out I that I don't know what the problem is...
I'll investigate!

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

Found it already! Obviously, I didn't clean up the cache of the compiled shaders correctly....
I'll fix it on master tomorrow!

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

Okay, this should be fixed! :)
Best,
Simon

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

Available after:
Pkg.checkout("GLVisualize");Pkg.checkout("GLAbstraction")

from glvisualize.jl.

dlfivefifty avatar dlfivefifty commented on September 26, 2024

Great!

Have you played around with Plots.jl yet?  It’s really nice for 2D plotting.  I’m thinking of adding GLVisualize as a pull request for that.  

On 25 Nov 2015, at 7:36 AM, Simon [email protected] wrote:

Available after:
Pkg.checkout("GLVisualize");Pkg.checkout("GLAbstraction")


Reply to this email directly or view it on GitHub #36 (comment).

from glvisualize.jl.

tbreloff avatar tbreloff commented on September 26, 2024

Yes please! You can start a new backend by copying src/backends/template.jl and adding the relevant stuff to src/plotter.jl. I've been wanting to link GLVisualize for a while but haven't gotten around to learning how it works. Start an issue with any questions.

Also... I'm starting to get better 3D support so you'll be able to do a lot right away. For example, the Plotly backend has 3D scatter, path, contour, and surfaces.

On Nov 24, 2015, at 6:14 PM, Sheehan Olver [email protected] wrote:

Great!

Have you played around with Plots.jl yet? It’s really nice for 2D plotting. I’m thinking of adding GLVisualize as a pull request for that.

On 25 Nov 2015, at 7:36 AM, Simon [email protected] wrote:

Available after:
Pkg.checkout("GLVisualize");Pkg.checkout("GLAbstraction")


Reply to this email directly or view it on GitHub #36 (comment).


Reply to this email directly or view it on GitHub.

from glvisualize.jl.

dlfivefifty avatar dlfivefifty commented on September 26, 2024

I’m still getting errors

julia> using GLVisualize

julia> w,render=glscreen();
WARNING: Base.Uint8 is deprecated, use UInt8 instead.
likely near no file:0

julia> render();
Nov 25 11:56:37 julia[41421] : void CGSUpdateManager::log() const: conn 0x313af: spurious update.

julia> render();
ERROR: Library == CNULL. FreeTypeAbstraction.done() called before init(), or done called two times?
in FreeTypeAbstraction_done at /Users/solver/.julia/v0.4/GLVisualize/src/FreeTypeAbstraction.jl:45
in renderloop at /Users/solver/.julia/v0.4/GLVisualize/src/display/renderloop.jl:137
in renderloop_fun at /Users/solver/.julia/v0.4/GLVisualize/src/display/renderloop.jl:123 (repeats 2 times)

julia> w,render=glscreen();
ERROR: initialization failed
in Init at /Users/solver/.julia/v0.4/GLFW/src/glfw3.jl:308
in glscreen at /Users/solver/.julia/v0.4/GLVisualize/src/display/renderloop.jl:95

On 25 Nov 2015, at 10:30 AM, Tom Breloff [email protected] wrote:

Yes please! You can start a new backend by copying src/backends/template.jl and adding the relevant stuff to src/plotter.jl. I've been wanting to link GLVisualize for a while but haven't gotten around to learning how it works. Start an issue with any questions.

Also... I'm starting to get better 3D support so you'll be able to do a lot right away. For example, the Plotly backend has 3D scatter, path, contour, and surfaces.

On Nov 24, 2015, at 6:14 PM, Sheehan Olver [email protected] wrote:

Great!

Have you played around with Plots.jl yet? It’s really nice for 2D plotting. I’m thinking of adding GLVisualize as a pull request for that.

On 25 Nov 2015, at 7:36 AM, Simon [email protected] wrote:

Available after:
Pkg.checkout("GLVisualize");Pkg.checkout("GLAbstraction")


Reply to this email directly or view it on GitHub #36 (comment).


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub #36 (comment).

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

hm... CGSUpdateManager::log() sounds like a GLFW problem on OSX.
Can you try:

using GLVisualize
w,r = glscreen()
render()
#close window
w,r = glscreen()
render()

it's definitely wrong to call render after the window is closed. It's a statefull closure, specific to that one window, which is why it gets returned ;)

from glvisualize.jl.

dlfivefifty avatar dlfivefifty commented on September 26, 2024

OK That works! Thought I tried it too, but guess not

On 25 Nov 2015, at 11:43 PM, Simon [email protected] wrote:

hm... CGSUpdateManager::log() sounds like a GLFW problem on OSX.
Can you try:

using GLVisualize
w,r = glscreen()
render()
#close window
w,r = glscreen()
render()
it's definitely wrong to call render after the window is closed. It's a statefull closure, specific to that one window, which is why it gets returned ;)


Reply to this email directly or view it on GitHub #36 (comment).

from glvisualize.jl.

dlfivefifty avatar dlfivefifty commented on September 26, 2024

Here’s another broken version. What if I want to create two different screens at the same time?

julia> using GLVisualize

julia> w,render=glscreen();
WARNING: Base.Uint8 is deprecated, use UInt8 instead.
likely near no file:0

julia> w,render=glscreen();
ERROR: Named attribute (:texturecoordinates) is not an active attribute in the specified program object or

        the name starts with the reserved prefix gl_

in get_attribute_location at /Users/solver/.julia/v0.4/GLAbstraction/src/GLExtendedFunctions.jl:30
in call at /Users/solver/.julia/v0.4/GLAbstraction/src/GLTypes.jl:116
in call at /Users/solver/.julia/v0.4/GLAbstraction/src/GLTypes.jl:155
in std_renderobject at /Users/solver/.julia/v0.4/GLAbstraction/src/GLRenderObject.jl:44
in assemble_std at /Users/solver/.julia/v0.4/GLVisualize/src/utils.jl:66
in postprocess at /Users/solver/.julia/v0.4/GLVisualize/src/display/renderloop.jl:48
in glscreen at /Users/solver/.julia/v0.4/GLVisualize/src/display/renderloop.jl:108

On 25 Nov 2015, at 11:43 PM, Simon [email protected] wrote:

hm... CGSUpdateManager::log() sounds like a GLFW problem on OSX.
Can you try:

using GLVisualize
w,r = glscreen()
render()
#close window
w,r = glscreen()
render()
it's definitely wrong to call render after the window is closed. It's a statefull closure, specific to that one window, which is why it gets returned ;)


Reply to this email directly or view it on GitHub #36 (comment).

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

The whole architecture is not really made for this yet. It's surprisingly difficult to use OpenGL with different windows. It is on my list but requires relatively drastic changes to ModernGL, GLWindow and GLAbstraction.
Would it be okay to have different screens in one window? That already works:

using GLVisualize, Reactive, GeometryTypes, GLWindow, GLAbstraction

w,r = glscreen()
xhalf(r)    = Rectangle(r.x,r.y, r.w÷2, r.h)
xhalf2(r)   = Rectangle(r.w÷2, r.y, r.w÷2, r.h)
const screen3D = Screen(w, area=const_lift(xhalf, w.area))
const screen2D = Screen(w, area=const_lift(xhalf2, w.area))
view(visualize(rand(Float32, 10,10)), screen3D)
view(visualize([rand(Point2f0)*1000 for i=1:50]), screen2D)
r()

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

image

from glvisualize.jl.

dlfivefifty avatar dlfivefifty commented on September 26, 2024

OK, in the context of Plots, maybe “plot" will close the previous window and open a new one, and “subplot” will do what you show here.

On 26 Nov 2015, at 9:57 AM, Simon [email protected] wrote:

https://cloud.githubusercontent.com/assets/1010467/11411441/55b8ff10-93d0-11e5-82de-bb005e04b2aa.png

Reply to this email directly or view it on GitHub #36 (comment).

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on September 26, 2024

Couldn't plot(...) just call empty!(window.renderlist), instead of closing the window?

from glvisualize.jl.

dlfivefifty avatar dlfivefifty commented on September 26, 2024

I suppose it could get access to window by calling current() to get the current plot, and therefore access to window. There may be some added difficulty in handling the first time when the window has to be setup.

On 26 Nov 2015, at 10:44 PM, Simon [email protected] wrote:

Couldn't plot(...) just call empty!(window.renderlist), instead of closing the window?


Reply to this email directly or view it on GitHub #36 (comment).

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.