I'm a fresh on this,but now I am trying to good at it, while I am reading book about modelview, I got a problem... I can't understand about it.
Now show those codes:
float mat[16];
glGetFloatv(GL_MODELVIEW_MATRIX, mat);
vector3_t X(mat[0], mat[4], mat[8]);
vector3_t Z(mat[1], mat[5], mat[9]);
glBindTexture(GL_TEXTURE_2D, g_cactus[cactus]);
vector3_t pos(x,0.0,-z);
pos.y = GetHeight(x, -z) + h + s;
glBegin(GL_QUADS);
glTexCoord2f(0.0,0.0);glVertex3fv((pos+(X+Z)*-h).v); glTexCoord2f(1.0,0.0);glVertex3fv((pos+(X-Z)* h).v);
glTexCoord2f(1.0,1.0);glVertex3fv((pos+(X+Z)* h).v);
glTexCoord2f(0.0,1.0);glVertex3fv((pos+(Z-X)* h).v);
glEnd();
What's the "mat" mean? And the following datas(0,4,8,1,5,9)?
Thanks for your help!