GLFW.jl icon indicating copy to clipboard operation
GLFW.jl copied to clipboard

Release latest changes?

Open novemberist opened this issue 1 year ago • 1 comments

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

# 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.

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?

novemberist avatar Apr 16 '24 02:04 novemberist

Bump @SimonDanisch :pray:

JamesWrigley avatar Jun 11 '24 09:06 JamesWrigley

I think this can be closed now :)

JamesWrigley avatar Jul 08 '24 22:07 JamesWrigley