RodenLuo / cpp_questions

0 stars 0 forks source link

why many times I see length as NULL? #8

Closed RodenLuo closed 3 years ago

RodenLuo commented 3 years ago

image

ondrejstrnad commented 3 years ago

Beware that it's not length BUT pointer to length. That's why it can be NULL. If the parameter was GLsizei, it could not be NULL. When a parameter is set to NULL it many times means that "I don't care" of "default" OR it can be a return value from the function. In this case, this is really a return value. See: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetProgramInfoLog.xhtml