getMousePos in GLFW
Hey, I'm having a bit of problem in my programming. I'd like to get the mouseposition after clicking, so I use the function glfwgetMousePos (int *xpos, int *ypos) in GLFW. Also, i assign xpos = 0 in the beginning, and this is the answer i get wherever i click. How am i supposed to use this function correctly, so that xpos and ypos gets the current location?
All help appreciated!
static GLuint x_pos(0), y_pos(0) ;glfwGetMousePos( &x_pos, &y_pos ) ;// variable 'x_pos' and 'y_pos' should hold the last known coordinates// for the mouse position. There is another function in GLFW// that determines whether or not a button has been clicked.// Use that in conjunction from the above example to get// the last mouse clicking position.
~Khaosifix
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement