title: Understanding OpenGL ES: CATransform3DScale instead of glScalef?
body: <p>So, I'm taking on OpenGL ES this evening and am working through some sample code to become aquainted. I currently am drawing a cube and ran across two methods of doing (seemingly) the same thing:</p>
  
  <p><strong>Method #1 (more verbose)</strong></p>
  
  <pre><code>CATransform3D currentCalculatedMatrix = CATransform3DIdentity;
  CATransform3D scaleTransform = CATransform3DScale(currentCalculatedMatrix, 2.0f, 2.0f, 1.0f);
  GLfloat currentModelViewMatrix[16];
  [self convert3DTransform:&amp;scaleTransform toMatrix:currentModelViewMatrix];
  glLoadMatrixf(currentModelViewMatrix);
  </code></pre>
  
  <p><strong>Method #2 (much less code)</strong></p>
  
  <pre><code>glScalef(2.0f, 2.0f, 1.0f);
  </code></pre>
  
  <p>Now, it seems that with both of those examples, my cube is now 100% larger. I'm wondering, in what situations would I want to use method #1 of scaling my <code>ModelView</code> matrix rather than the short and sweet method #2? In my very simple example, it seems that both methods do the <em>exact</em> same thing.</p>