glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *ptr);
函数的意义是为 Atrtribute 变量制定VBO中的数据。
参数:
1): index , Attribute的索引
2): size, Attribute 变量数据是由几个元素组成的, x,y,z,w ; 最多四个。
3): normalized, 是否归一化, 编程1.0以内的数,这样做的目的是减少向gpu传递数据的带宽。
4): stride, 元素间隔,, 通常是0