[QUOTE=GreenOwl;1253885]1) What format does the matrix (as GLfloat) for the function glUniformMatrix__ has to have?
It’s just MxN floats, e.g. 16 floats for glUniformMatrix4fv(), 6 floats for glUniformMatrix2x3fv(), etc. The elements are in column-major order if the “transpose” argument is false or row-major order if it’s true. The interpretation of the matrix is up to the shader.
I ask, because I read somewhere, that OpenGL calls aren’t necessarily issued instantly and the pointer might be invalid if the “upload into vram” happens to late.[/QUOTE]
Apart from the glPointer functions (glVertexPointer etc), any data referenced by a pointer will be copied before the function returns. In the case of the glPointer functions, the data will be copied before the corresponding draw call (glDrawArrays etc) returns.