1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

LibGL: Implement glLinkProgram

This commit is contained in:
Stephan Unverwerth 2022-08-28 12:04:18 +02:00 committed by Andrew Kaster
parent 7f062e35a4
commit fdd76639d8
2 changed files with 9 additions and 2 deletions

View file

@ -109,8 +109,13 @@ void GLContext::gl_attach_shader(GLuint program, GLuint shader)
void GLContext::gl_link_program(GLuint program)
{
dbgln("gl_link_program({}) unimplemented ", program);
TODO();
auto program_it = m_allocated_programs.find(program);
// FIXME: implement check "GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."
RETURN_WITH_ERROR_IF(program_it == m_allocated_programs.end(), GL_INVALID_OPERATION);
// FIXME: implement check "GL_INVALID_OPERATION is generated if program is the currently active program object and transform feedback mode is active."
// NOTE: We are ignoring the link result since this is tracked inside the program object
(void)program_it->value->link();
}
}