|
@@ -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();
|
|
|
}
|
|
|
|
|
|
}
|