1 | void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, Const GLfloat *value); |
1 | glUniformMatrix4fv(location, 1, GL_FALSE, &MatrixName.Elements[0][0]); |
1 2 | hmm_m4 m = ...; glUniformMatrix4fv(location, 1, transpose, (float*)&m); |
1 2 3 4 5 6 | typedef union hmm_mat4 { float Elements[4][4]; } hmm_mat4; typedef hmm_mat4 hmm_m4; |
1 | glUniformMatrix4fv(MatrixID, 1, GL_FALSE, &MVP.Elements[0][0]); |