MCPcopy Create free account
hub / github.com/baldurk/renderdoc / CreateMeshProgram

Method CreateMeshProgram

renderdoc/driver/gl/gl_debug.cpp:253–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253GLuint GLReplay::CreateMeshProgram(GLuint vs, GLuint fs, GLuint gs)
254{
255 GLuint program = CreateShaderProgram(vs, fs, gs);
256
257 // set attrib locations
258 GL.glBindAttribLocation(program, 0, "position");
259 GL.glBindAttribLocation(program, 1, "IN_secondary");
260
261 // relink
262 GL.glLinkProgram(program);
263
264 // check that the relink succeeded
265 char buffer[1024] = {};
266 GLint status = 0;
267 GL.glGetProgramiv(program, eGL_LINK_STATUS, &status);
268 if(status == 0)
269 {
270 GL.glGetProgramInfoLog(program, 1024, NULL, buffer);
271 RDCERR("Link error: %s", buffer);
272 }
273
274 // detach the shaders
275 GL.glDetachShader(program, vs);
276 GL.glDetachShader(program, fs);
277 if(gs)
278 GL.glDetachShader(program, gs);
279
280 // bind the UBO
281 BindUBO(program, "MeshUBOData", 0);
282
283 return program;
284}
285
286void GLReplay::ConfigureTexDisplayProgramBindings(GLuint program)
287{

Callers

nothing calls this directly

Calls 6

CreateShaderProgramFunction · 0.85
glBindAttribLocationMethod · 0.45
glLinkProgramMethod · 0.45
glGetProgramivMethod · 0.45
glGetProgramInfoLogMethod · 0.45
glDetachShaderMethod · 0.45

Tested by

no test coverage detected