glfwSetCallback functions

anonymous wrote on Friday, February 03, 2012:

I’m using glfw’s callback system to track input. The reference guide says that
callback functions are only called when glfw is asked to poll events.
Although, when I register callback function, the register function calls the
callback, thus breaking the depency needed in program initialization. I cannot
really fix this problem, since I won’t change the structure of my program. I
have used a workaround which checks if the callback function is still
registering.
I’m hoping this will be fixed or at least there is an option to prevent
calling a callback function on its registration.

elmindreda wrote on Sunday, February 05, 2012:

You’re right. The glfwSetMousePosCallback and glfwSetMouseWheelCallback lack
the reference manual note that glfwSetWindowSizeCallback has. I have committed
a fix that will be included in 2.7.3.

It may be, however, that this behaviour isn’t the right thing to do. I’m
currently working on GLFW 3, which is an opportunity to re-examine things like
that.