-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with GLFW #84
Comments
In this minimal example, you should put a preserve in there: function watchFileUpdate(path::AbstractString, OnUpdate::Function)
preserve(map(isUpdated(query(path))) do _unused
println("OnUpdate: ", path)
end)
end Otherwise the signal might get garbage collected! Just to understand you better, is this minimal example only broken together with GLFW? |
If the latter is the case, how does the while loop look exactly? while !GLFW.WindowShouldClose(window)
GLFW.PollEvents()
sleep(0.01)
end You would need a |
Okey, it was a bit more. I still dont know whats going on. If i use GL functions in the loop it wont update. if i use non-GL functions it may work (sometimes it does and sometimes not). May something is overwritten in RAM? Its really confusing. For a moment i thought it has to do with the focus of the window when i start my program but i couldnt reproduce the problem. while !GLFW.WindowShouldClose(window)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) #or Dates.time()
GLFW.PollEvents()
yield() # or sleep
end |
I dont know if this is the same problem (i dont get errors so far): #88 |
System: Windows 8.1 (x64)
Julia: 0.4.0
when i use GLFW.PollEvents() and sleep(0.01) in a while loop it seems signals are not updated. sometimes it works and sometimes not. (this often happens when i move the glfw window. it just breaks and i get no more updates)
May its a common problem when using GLFW. Is there a workround for it?
I use signals to check a file update, it prints me a msg when i change the file.
Code:
The text was updated successfully, but these errors were encountered: