Can variables be changed after using glUniform pointer options?

I am wondering if glUniformXXv is blocking until the data referenced by the pointer is copied to the GPU. In other words, can this code cause problems if the GPU is busy?

int i=5;
glUniform1iv(location,1,&i);
i = 6;

Will glUniform1fv cause 6 to send if the GPU is busy?

+5
source share
1 answer

With the exception of OpenGL functions ending with the word "Pointer", every OpenGL function that accepts a pointer will read / write this pointer until it returns. Therefore, changes in memory after the fact will not be visible.

+4
source

All Articles