render: Try to do proper cleanup on egl

shader-damage
Andri Yngvason 2019-10-11 22:18:56 +00:00
parent 7d3d2d2789
commit b07de643ab
1 changed files with 5 additions and 1 deletions

View File

@ -271,9 +271,13 @@ void gl_render(void)
void renderer_destroy(struct renderer* self)
{
glDeleteProgram(self->dmabuf_shader_program);
glDeleteProgram(self->texture_shader_program);
eglMakeCurrent(self->display, EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT);
eglDestroySurface(self->display, self->surface);
eglDestroyContext(self->display, self->context);
glDeleteProgram(self->dmabuf_shader_program);
eglTerminate(self->display);
}
int renderer_init(struct renderer* self, uint32_t width, uint32_t height)