title: openGL using glVertexAttribPointer
body: <p>So I created a quad using glBegin(GL_QUADS) and then drawing vertices and now I want to pass into my shader an array of texture coordinates so that I can apply a texture to my quad. </p>
  
  <p>So I'm having some trouble getting the syntax right. </p>
  
  <p>First I made a 2D array of values</p>
  
  <pre><code>GLfloat coords[4][2];
  coords[0][0] = 0;
  coords[0][1] = 0;
  coords[1][0] = 1;
  coords[1][1] = 0;
  coords[2][0] = 1;
  coords[2][1] = 1;
  coords[3][0] = 0;
  coords[3][1] = 1;
  </code></pre>
  
  <p>and then I tried to put it into my shader where I have a attribute vec2 texcoordIn</p>
  
  <pre><code>GLint texcoord = glGetAttribLocation(shader-&gt;programID(), "texcoordIn");
  glEnableVertexAttribArray(texcoord);
  glVertexAttribPointer(texcoord, ???, GL_FLOAT, ???, ???, coords);
  </code></pre>
  
  <p>So I'm confused as to what I should put in for parameters to glVertexAttribPointer that I marked with '???' and I'm also wondering if I'm even allowed to represent the texture coordinates as a 2d array like I did in the first place. </p>