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:
https://github.com/JuliaGL/GLFW.jl/commit/375408b826f8c510f1cf3740b46a2bb44804d2cd
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?