How to pass a member function to glfwSetMouseButtonCallback

begre1929 wrote on Thursday, April 10, 2014:

hi,
I have a class,
class Tomato{
/…/
public:
Tomato(); // the constructor
/static?/ void button(GLFWwindow*,int,int,int);
/…/
}

in the constructor,
Tomato::Tomato()
{
/…/
glfwSetMouseButtonCallback(window, ??? );
/…/
}

where ??? means I failed so far to pass button. Could you tell me how to do that ?

elmindreda wrote on Thursday, April 10, 2014:

It’s in the FAQ.

begre1929 wrote on Thursday, April 10, 2014:

I see C… see you
thx!