title: opengl 3d point cloud render from x,y,z 2d array
body: <p>Need some direction on 3d point cloud display using openGl in c++ (vs2008).  I am trying to do a 3d point cloud display with a texture. I have 3 2D arrays (each same size 1024x512) representing x,y,z of each point.  I think I am on the right track with</p>
  
  <pre><code>glBegin(GL_POINTS);
  for(int i=0; i&lt;1024; i++)
  {
     for(int j=0; j&lt;512; j++)
     {
         glVertex3f(x[i][j], y[i][j], z[i][j]);
     }
   }    
  }    
  glEnd();
  </code></pre>
  
  <p>Now this loads all the vertices in the buffer (i think) but from here I am not sure how to proceed. Or I am completely <strong>wrong</strong> here.  </p>
  
  <p>Then I have another 2D array (same size) that contains color data (values from 0-255) that I want to use as texture on the 3D point cloud and display.</p>