Rather noob-ish question, hope noone minds

nobody wrote on Wednesday, June 30, 2004:

Would someone mind showing an actual example about how to use the GFLWSetMousePosCallback? The example in the User’s Guide and the Reference aren’t helping me much, and I have a feeling once I see actual code I’ll understand. Thanks!

marcus256 wrote on Wednesday, July 07, 2004:

void GLFWCALL mouseposfun( int x, int y )
{
  printf("Mouse pos = %d,%d\n", x, y);
}

int main(void)
{
  glfwInit();
  glfwOpenWindow(100,100,8,8,8,0,0,0,GLFW_WINDOW);
  glfwSetMousePosCallback(mouseposfun);
  do
  {
    glfwPollEvents();  // <- this is where mouseposfun is called
  }
  while( !glfwGetKey(GLFW_KEY_ESC) );
  glfwTerminate();
}