title: OpenGL constant rotation angle
body: <p>I am doing some openGL programming lately and it invovles basic matrix transformation such as translation, rotation and scaling. I encounter some problems when doing rotation. Here is my question.</p>
  
  <p>Now I am using a variable rotationDegree and a variable rotationStepSize to control the rotation. When the rotation flag is on</p>
  
  <pre><code>//inside paintGL function
  if(rotationFlag is on)
       rotationDegree += rotationStepSize
       if(rotationDegree &gt; 360.0f)
           rotationDegree -= 360.0f
  </code></pre>
  
  <p>Here's the strange thing, Since I define rotationStepSize to be very small, the rotation starts out very slow, but then as time increases it gets faster and faster!</p>
  
  <p>I come up with two explanations for this phenomena:</p>
  
  <ul>
  <li>360f is not the range of values for the degree parameter in glm::rotate</li>
  <li>The program starts out slow, causing paintGL to be painted to screen less. Then as the program become steady(or other parameter is not changing), the mainLoopEvent is executing faster and faster, causing paintGL to be painted more.</li>
  </ul>
  
  <p>Does anyone know how to solve this problem? I googled about using glutget(GL_TIME_ELAPSED), but on my machine, this function reports "glutget: missing ENUM handle", which indicates that my glut file is not complete, I guess?</p>
  
  <p>So does anyone know how to fix the enum problem or how to get around this to create a scene where I have an object rotating in constant speed?</p>
  
  <p>Thanks a lot!</p>