title: OpenGL Object rotatating at normal speed on PC but extremely fast on Laptop
body: <p>I have one issue to do with handling input to rotate the object on screen.</p>
  
  <p>I coded everything on my desktop where it rotates as it should and you can manipulate the object in 3D space.</p>
  
  <p>On my laptop however, when I try to rotate the object, it actually rotates so fast you can barely even see it. I'm talking like dozens of rotations per second.</p>
  
  <p>My question is... Why? Why does it rotate at normal speed on my PC but at crazy high speed on my laptop? </p>
  
  <p>The rotation I used for each key press is 0.1... On my PC it rotates fast enough to be able to control or, but on my Laptop (and tablet, I tested it on a tablet as well) it just rotates way too fast! I was able to fix it on my laptop by changing the rotation amount to glm::radians(1.0f) and it rotates at normal speed... But on my PC it is rather slower than I would like.</p>
  
  <p>The only thing I can think of has something to do with delta time and the render speed (which I factored in to my camera controls). </p>
  
  <p>Here is my rotation function for reference...</p>
  
  <p>keyboard callback function (NOTE: I have an global array of Booleans called keys[], which I use to see if a key is being pressed)</p>
  
  <pre><code>// Handle the keyboard input
  void keyPressed(GLFWwindow *_window, int key, int scancode, int action, int mods) {
  
  // Close window with escape
  if (key == GLFW_KEY_ESCAPE &amp;&amp; action == GLFW_PRESS)
      glfwSetWindowShouldClose(window, GL_TRUE);
  // Change render to show points only with P
  if (key == GLFW_KEY_P &amp;&amp; action == GLFW_PRESS)
      glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
  // Change render to show filled in texture with T
  if (key == GLFW_KEY_T &amp;&amp; action == GLFW_PRESS)
      glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
  // Change render to show "wirefram" mesh with W
  if (key == GLFW_KEY_W &amp;&amp; action == GLFW_PRESS)
      glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
  
  // Array of keys, if key is being held down, sets index corresponding to appropriate integer related to key to true, and false when key is released
  if (key &gt;= 0 &amp;&amp; key &lt; 1024)
  {
      if (action == GLFW_PRESS)
          keys[key] = true;
      else if (action == GLFW_RELEASE)
          keys[key] = false;
  }
  return;
  }
  </code></pre>
  
  <p>And the rotation function (NOTE: clicks[0] is another array of Booleans I use to see if left mouse button is being pushed):</p>
  
  <pre><code>// rotate object based on keyboard input
  // Left mouse button must not be held down for this to work
  // Creates a matrix containing the appriopriate transformation, and this is later multipled to the model matrix
  void rotate_object(glm::mat4 &amp;transform)
  {
   // Rotate along z axis (left and right, like a barrel roll)
  if (!click[0] &amp;&amp; keys[GLFW_KEY_LEFT])
      transform = glm::rotate(transform, glm::radians(1.0f), glm::vec3(0.0f, 0.0f, 1.0f));
  if (!click[0] &amp;&amp; keys[GLFW_KEY_RIGHT])
      transform = glm::rotate(transform, glm::radians(-1.0f), glm::vec3(0.0f, 0.0f, 1.0f));
  // Rotate along x axis (up and down, like a flip)
  if (!click[0] &amp;&amp; keys[GLFW_KEY_UP])
      transform = glm::rotate(transform, glm::radians(1.0f), glm::vec3(1.0f, 0.0f, 0.0f));
  if (!click[0] &amp;&amp; keys[GLFW_KEY_DOWN])
      transform = glm::rotate(transform, glm::radians(-1.0f), glm::vec3(1.0f, 0.0f, 0.0f));
  // Rotate along y axes (make object spin)
  if (!click[0] &amp;&amp; keys[GLFW_KEY_K])
      transform = glm::rotate(transform, glm::radians(1.0f), glm::vec3(0.0f, 1.0f, 0.0f));
  if (!click[0] &amp;&amp; keys[GLFW_KEY_L])
      transform = glm::rotate(transform, glm::radians(-1.0f), glm::vec3(0.0f, 1.0f, 0.0f));
  }
  </code></pre>
  
  <p>I appreciate your input!</p>
  
  <p>Thanks,</p>