OpenGL - glShaderSource

Can somebody please try to explain parameters two and four. I am trying to create a shader from source code and I'm unable to interpret from the OpenGL documentation the purpose of these parameters.

In regards to the fourth parameter, the documentation also states - "If length is NULL, each string is assumed to be null terminated. If length is a value other than NULL, it points to an array containing a string length for each of the corresponding elements of string." - can somebody please try to explain this in layman's terms.

Parameters

shader
Specifies the handle of the shader object whose source code is to be replaced.

count
Specifies the number of elements in the string and length arrays.

string
Specifies an array of pointers to strings containing the source code to be loaded into the shader.

length
Specifies an array of string lengths.
Last edited on
Topic archived. No new replies allowed.