# Difference between calling glfwGetCursorPos() vs callback

**URL:** https://discourse.glfw.org/t/difference-between-calling-glfwgetcursorpos-vs-callback/1401
**Category:** support
**Created:** [August 12, 2019, 10:03am UTC](https://discourse.glfw.org/t/difference-between-calling-glfwgetcursorpos-vs-callback/1401 "2019-08-12T10:03:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jackywhite](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/jackywhite/32/567_2.png) [@jackywhite](https://discourse.glfw.org/u/jackywhite)
#### Post date: [August 12, 2019, 10:03am UTC](https://discourse.glfw.org/t/difference-between-calling-glfwgetcursorpos-vs-callback/1401/1 "2019-08-12T10:03:30Z")

</div>

What is the practical application of using callback to retrieve cursor position instead of `glfwGetCursorPos()`?

What method should I use to calculate camera rotation, as the difference between previous and current frame’s position of the cursor?

---

<div class="post-metadata">

### Author: ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)
#### Post date: [August 12, 2019, 5:47pm UTC](https://discourse.glfw.org/t/difference-between-calling-glfwgetcursorpos-vs-callback/1401/2 "2019-08-12T17:47:17Z")

</div>

The cursor callback can be called more than once per frame for every movement event, which could be useful for things like drawing applications.

For camera rotation, `glfwGetCursorPos()` is usually sufficient. This subject is a little more advanced than is easily covered in a forum reply, but there are a number of decent tutorials online you can search for, for example:

[https://learnopengl.com/Getting-started/Camera](https://learnopengl.com/Getting-started/Camera)
