libobs-opengl: Store FBOs per texture instead of per device

The previous model stored a new FBO per texture width/height/format on
a array in the device struct. This allocated memory was only released
on gs_device_destroy (obs exit).

The new approach stores a FBO on gs_texture and the its info is
destroyed once the texture is deleted.
This commit is contained in:
Shaolin
2018-08-31 18:07:00 -03:00
parent 11b84a5d85
commit acd44b525e
7 changed files with 58 additions and 72 deletions

View File

@@ -138,6 +138,9 @@ void gs_texture_destroy(gs_texture_t *tex)
if (tex->texture)
gl_delete_textures(1, &tex->texture);
if (tex->fbo)
fbo_info_destroy(tex->fbo);
bfree(tex);
}