PDA

View Full Version : glUniformMatrix4fv when is the data copied?



xman84
04-03-2012, 03:12 PM
Does glUniformMatrix4fv instantly copy data pointed to by the passed in pointer? If not when does it make the copy? Would it be the glDrawElements or glDrawArrays call?

Alfonse Reinheart
04-03-2012, 03:33 PM
The same time as any pointer data you give OpenGL (unless the function explicitly states otherwise): immediately.

Indeed, the only exceptions are the attribute pointer functions when using client memory. Other than that, every function immediately does its copy when given client memory.