title: Using GL_INT_2_10_10_10_REV in glVertexAttribPointer()
body: <p>Can anybody tell me how exactly do we use GL_INT_2_10_10_10_REV as type parameter in glVertexAttribPointer() ?
  I am trying to pass color values using this type. Also what is the significance of "REV" suffix in this type ? Does it require any special treatment in the shaders ?</p>
  
  <p>My code is as follows :</p>
  
  <pre><code>GLuint red=1023,green=1023,blue=1023,alpha=3;
  
  GLuint val = 0;
  val = val | (alpha &lt;&lt; 30);
  val = val | (blue &lt;&lt; 20);
  val = val | (green &lt;&lt; 10);
  val = val | (red &lt;&lt; 0);
  
  GLuint test_data[]={val,val,val,val};
  
  loadshaders();
  
  glBindAttribLocation(ps,0,"tk_position");
  
  glBindAttribLocation(ps,1,"color");
  
  LinkShader();
  
  glUseProgram(ps);
  
  glEnableVertexAttribArray (0);
  
  glVertexAttribPointer(0, 4, GL_FLOAT, 0, 0, vertices);
  
  glEnableVertexAttribArray (1);
  
  glVertexAttribPointer(1,GL_BGRA,GL_UNSIGNED_INT_2_10_10_10_REV,GL_TRUE,0,test_data);
  
  glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
  </code></pre>
  
  <p>The shaders are :
  Vertex Shader -</p>
  
  <pre><code>#version 150
  
  in vec4 tk_position;
  in vec4 color;
  
  out vec4 v_color;
  
  void main()
  {
      v_color = color;
      gl_Position = tk_position; 
  }
  </code></pre>
  
  <p>Fragment shader -</p>
  
  <pre><code>#version 150
  
  in vec4 v_color;
  out vec4 fragColor;
  
  void main()
  {
      fragColor =  v_color;
  }
  </code></pre>
  
  <p>The program object is validated as well. No issues there. This code works fine on AMD card,but fails on NVidia. Failing means I get NULL Pointer access at glDrawArrays() call.</p>
  
  <pre><code>Access violation
      Exception Flag: 0x00000000
      Exception Addr: 0x055f32ce
  </code></pre>