Pointant vers une fonction qui est un membre de la classe - glfw setKeycallback

Je suis en train d'écrire un glfw application, dans lequel j'ai regroupé la fonction callse dans une classe simple. Im ayant de la difficulté à mettre la clé de rappel.
Ma classe est définie comme:

class GAME 
{
private:
    bool running;
public:
    GAME();
    int execute();
    void events(int, int);
    int loop();
    int render();
};

L'exécution de la fonction est:

int GAME::execute() 
    {
        glfwOpenWindow(640, 320, 8, 8, 8, 8, 0, 0, GLFW_WINDOW);
        glfwSetWindowTitle("Viraj");
        glfwSetKeyCallback(events);
        running = true;
        while(glfwGetWindowParam(GLFW_OPENED))
        {
            glfwPollEvents();
            loop();
            render();
        }
        return 0;
    }

De compiler le code suivant sur Visual Studio 2010, donne l'erreur:

error C3867: 'GAME::events': function call missing argument list; use '&GAME::events' to create a pointer to member

À l'aide de &JEU::événements donne:

error C2664: 'glfwSetKeyCallback' : cannot convert parameter 1 from 'void (__thiscall GAME::* )(int,int)' to 'GLFWkeyfun'
1> There is no context in which this conversion is possible

InformationsquelleAutor viraj | 2011-10-06