| 251 | } |
| 252 | |
| 253 | GLuint 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 | |
| 286 | void GLReplay::ConfigureTexDisplayProgramBindings(GLuint program) |
| 287 | { |
nothing calls this directly
no test coverage detected