title: OpengGL glDrawElements draws lines but not triangles
body: <p>I have the following code:</p>
  
  <pre><code>for(auto m:shapes) {
      glVertexPointer(3, GL_DOUBLE, 0, m-&gt;verts);
  
      glNormalPointer(GL_DOUBLE, 0, m-&gt;normals);
  
      glDrawElements(GL_TRIANGLES, m-&gt;num_triangles*3, GL_UNSIGNED_INT, m-&gt;indices);
  }
  </code></pre>
  
  <p>(In the pics the circle and the point does not matter, they are drawn by some other code. Sorry, I can't post images, I am a new user...)</p>
  
  <p><a href="http://dl.dropbox.com/u/5269/Screen%20shot%202011-12-10%20at%2012.38.28%20PM.png" rel="nofollow">http://dl.dropbox.com/u/5269/Screen%20shot%202011-12-10%20at%2012.38.28%20PM.png</a></p>
  
  <p>It seem it does not draw anything.</p>
  
  <p>If I change GL_TRIANGLES to GL_LINES:</p>
  
  <pre><code>for(auto m:shapes) {
      glVertexPointer(3, GL_DOUBLE, 0, m-&gt;verts);
  
      glNormalPointer(GL_DOUBLE, 0, m-&gt;normals);
  
      glDrawElements(GL_TRIANGLES, m-&gt;num_triangles*3, GL_UNSIGNED_INT, m-&gt;indices);
  }
  </code></pre>
  
  <p><a href="http://dl.dropbox.com/u/5269/Screen%20shot%202011-12-10%20at%2012.44.56%20PM.png" rel="nofollow">http://dl.dropbox.com/u/5269/Screen%20shot%202011-12-10%20at%2012.44.56%20PM.png</a></p>
  
  <p>So it seems that the coordinates are valid in the vertext buffer, and the index buffer is OK too. glGetError returns 0. And the weirdest thing is that the same code works for other vertex buffers generated by the same source.</p>
  
  <p>Any ideas?</p>