how to pass a member function to glfwSetMouseButtonCallback

Using GLFW
nicoo
2014-04-10
2014-04-10
  • nicoo
    nicoo
    2014-04-10

    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 ?

     
  • Camilla Löwy
    Camilla Löwy
    2014-04-10

    It's in the FAQ.

     
  • nicoo
    nicoo
    2014-04-10

    I see C... see you
    thx!