Original Post
heya, I'm in the process of implementing the input system for my engine. Although I have abstracted the main parts of the engine away via interfaces, the only implementation for my window system at the moment is GLFW (hopefully a wxWindows implementation in the near future). So I thought I'll use the input functions of GLFW for the current implementation of my (simple) input system. Now GLFW is a non OO library and uses function pointers to register the callbacks for the input (i.e: void glfwSetKeyCallback( GLFWkeyfun cbfun )). My engine is pure OO and I want to keep it that way. My inital though was to have an IInput interface and an CGLFWInput implementation which has got an update() methode to gather the input. In the update methode a glfwPollEvents() would be called which should the call the callback function registered via glfwSetKeyCallback(). The problem I got is, that I can't pass a pointer to a methode of the CGLFWInput class to the glfwSetKeyCallback() function, as it requires a function pointer, not a pointer to a methode. Does anybody know a solution to this, as I don't want to poll every single key every time... thanks, benderB