title: Rotation matrix is scaling
body: <p>I am using OpenGL 3.2 in Java via LWJGL, and have discovered that using glRotate is no longer possible. So, I coded up some rotation matrices to handle rotating. The only problem is that they are scaling the objects when they are rotated, and I can't figure out why.</p>
  
  <p>My matrix creator: </p>
  
  <pre><code>Matrix4f rmat = new Matrix4f(); // identity
  float c = (float) Math.cos(theta);
  float s = (float) Math.sin(theta);
  rmat.m00 = c;
  rmat.m11 = c;
  rmat.m10 = s;
  rmat.m01 = -s;
  </code></pre>
  
  <p>The result is a scaled image, I am not sure how much. The difference is noticeable in this picture: <img src="https://i.stack.imgur.com/ODSRO.png" alt="RotScaled"> </p>
  
  <p>Does anyone know why this is going on or how to fix it?</p>
  
  <p>NB: This is part of a very large internal library, I am not sure how much could be extracted into an example. Feel free to run the RotationTest class that produced the image from <a href="https://github.com/TechShroom/EmergencyLanding" rel="nofollow noreferrer">here</a>. Sorry that there isn't a jar, but the library doesn't play nice with jars right now.</p>