これらのチュートリアルは非常に簡単です
http://www.lighthouse3d.com/tutorials/glsl-tutorial/
従うだけで、マトリックスでファンキーなことは何もしません.
頂点属性を使用するには、GLSL シェーダーで定義する必要があります。
attribute float attribute_name; //or another type
void main()
{
/// do it
}
cpp/c で配列を渡します。
glUseProgram(program);
//get location of your attribute variable
GLuint loc = glGetAttribLocation(program, "attribute_name");
//enable it
glEnableVertexAttribArray( loc );
//and pass the value
glVertexAttribPointer(loc,1,GL_FLOAT,GL_TRUE,0,attr_array);
//pass other stuff as usual
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, 0, uvs );
glEnableClientState( GL_VERTEX_ARRAY );
glVertexPointer ( 3, GL_FLOAT, 0, ver );
glEnableClientState( GL_NORMAL_ARRAY );
glNormalPointer ( GL_FLOAT, 0, nor );
//do draw