MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / Link

Method Link

GTE/Graphics/GL46/GLSLProgramFactory.cpp:224–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224bool GLSLProgramFactory::Link(GLuint programHandle)
225{
226 glLinkProgram(programHandle);
227 int32_t status;
228 glGetProgramiv(programHandle, GL_LINK_STATUS, &status);
229 if (status == GL_TRUE)
230 {
231 return true;
232 }
233
234 int32_t logLength;
235 glGetProgramiv(programHandle, GL_INFO_LOG_LENGTH, &logLength);
236 if (logLength > 0)
237 {
238 std::vector<GLchar> log(logLength);
239 int32_t numWritten;
240 glGetProgramInfoLog(programHandle, logLength, &numWritten, log.data());
241 std::string message(log.data());
242 LogError("Link failed:\n" + message);
243 }
244 else
245 {
246 LogError("Invalid info log length.");
247 }
248}
249
250

Callers

nothing calls this directly

Calls 3

glLinkProgramFunction · 0.85
glGetProgramivFunction · 0.85
glGetProgramInfoLogFunction · 0.85

Tested by

no test coverage detected