One more concern, i was using glVertexAttribP4uiv with GL_INT_2_10_10_10_REV. For signed data type, we have to use same API. So i was calling it with GL_INT_2_10_10_10_REV enum and data which i used is:
Code :
GLint red=0,green=511,blue=511,alpha=1;
	GLint val = 0;
 
	val = val | (alpha << 30);
	val = val | (blue << 20);
	val = val | (green << 10);
	val = val | (red << 0);
GLuint test_data[]={val,val,val,val};

Now, this gives me black color. I must be going wrong with the data types. Please let me know the correct one to use GL_INT_2_10_10_10_REV.