You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the latest Release version v3.4.1 of this package, that is currently supplied by Julia's package manager, is more than 3 years old. There have been some important changes since then, notably:
# Key and button actions
@enum Action::Cint begin
RELEASE = 0
PRESS = 1
REPEAT = 2
end
# GetKey is defined below to return a Bool, but in the documentation it is
# defined as returning PRESS or RELEASE. In C that doesn't matter, but in
# Julia these are different types and so e.g.
# `GLFW.GetKey(window, GLFW.KEY_ESCAPE)) == GLFW.PRESS` will always return
# false.
#
# This method tells Julia how to compare an Action and a Bool so that code
# calling GetKey as documented will work as expected.
Base.:(==)(b::Bool, a::Action) = b == Integer(a)
Base.:(==)(a::Action, b::Bool) = b == a
The method definition for == is not in v3.4.1 and makes GLFW.GetKey(window, GLFW.KEY_ESCAPE)) == GLFW.PRESS not work. This is really confusing for people who might be following official tutorials for GLFW.
Hello,
the latest Release version v3.4.1 of this package, that is currently supplied by Julia's package manager, is more than 3 years old. There have been some important changes since then, notably:
375408b
The method definition for == is not in v3.4.1 and makes GLFW.GetKey(window, GLFW.KEY_ESCAPE)) == GLFW.PRESS not work. This is really confusing for people who might be following official tutorials for GLFW.
Even the Example code from https://github.com/JuliaGL/GLAbstraction.jl does not fully work, because it contains the comparison in question.
Are there any plans to release a new package version soon?
The text was updated successfully, but these errors were encountered: