Hello everyone,
i’m trying to understand why my code throws an INVALID_VALUE when trying to link a successful attached set of shaders to a program.
I’ve checked the specifications and it seems that INVALID_VALUE is thrown only when the parameter specified is not a program created by OpenGL, but i’m quite sure it is.
The odd thing is that with NVIDIA drivers v.310 the problem disappears.
The code is the following:
glLinkProgram(m_programId);
GLint linkStatus;
glGetProgramiv(m_programId, GL_LINK_STATUS, &linkStatus);
m_linked = (linkStatus == GL_TRUE);
if(!m_linked)
{
GLint logLength;
glGetProgramiv(m_programId, GL_INFO_LOG_LENGTH, &logLength);
char* log = new char[logLength];
GLsizei length;
glGetProgramInfoLog(m_programId, logLength, &length, log);
m_linkLog = log;
delete[] log;
}
else
m_linkLog = "";
return m_linked;
But glGetProgramiv(m_programId, GL_LINK_STATUS, &linkStatus); returns GL_TRUE, and if i check the INFO_LOG anyways it’s always
Any suggestions?
Thanks