Skip to content

Instantly share code, notes, and snippets.

@v3c70r
Created May 18, 2016 20:06
Show Gist options
  • Save v3c70r/0d986daedd9f0bfddfd3a084ae8c742f to your computer and use it in GitHub Desktop.
Save v3c70r/0d986daedd9f0bfddfd3a084ae8c742f to your computer and use it in GitHub Desktop.
//全是伪代码
preMousePos;
updateCamera()
{
if (leftBtnPressed)
{
curMousePos = glfwGetMousePos();
mouseDiff = curMousPose - preMousePos;
applyRotationToCamera(mouseDiff);
preMousePos = curMousePos;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment