返回着色器程序的日志信息。
void glGetProgramInfoLog( GLuint program,
GLsizei maxLength,
GLsizei *length,
GLchar *infoLog);
program
Specifies the program object whose information log is to be queried.
指定着色器程序对象标识符
maxLength
Specifies the size of the character buffer for storing the returned information log.
指定日志信息的长度,由glGetProgramiv来获取
length
Returns the length of the string returned in infoLog (excluding the null terminator).
获取实际返回的日志信息长度。
infoLog
Specifies an array of characters that is used to return the information log.
获取日志信息。
osg/GLExtensions.cpp
bool GLExtensions::getProgramInfoLog( GLuint program, std::string& result ) const
{
GLsizei bufLen = 0; // length of buffer to allocate
GLsizei strLen = 0; // strlen GL actually wrote to buffer
glGetProg