Hello Guest

Problem with getting cursor's position

  • 0 Replies
  • 3996 Views
Problem with getting cursor's position
« on: January 24, 2019, 17:42:45 »
I am hoping for drawing the path of my cursor on the screen when I press mouse's left button. I do it by getting the position of cursor with
glfwSetCursorPosCallBack, and use glDrawPixel to draw the point on the screen. And the problem is when I move my mouse a little faster, the line become a series of dispersed point on my screen. It seems the frequency of the cursor's position fresh is too low. I wonder if someone can help me out, and I will be really appreciative.

https://paste.ubuntu.com/p/pMCKtZmTjH/

Here is my code for short, as you can see when you move your cursor fast, the delta of coordinate is really huge, and I want make the delta equals 1.0 on X or Y direction for each output.
« Last Edit: January 24, 2019, 17:51:08 by HideoKuze »