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:
@@ -148,11 +148,10 @@ extern bool gl_init_face(GLenum target, GLenum type, uint32_t num_levels,
|
||||
uint32_t width, uint32_t height, uint32_t size,
|
||||
const uint8_t ***p_data);
|
||||
|
||||
extern bool gl_copy_texture(struct gs_device *device,
|
||||
GLuint dst, GLenum dst_target, uint32_t dst_x, uint32_t dst_y,
|
||||
GLuint src, GLenum src_target, uint32_t src_x, uint32_t src_y,
|
||||
uint32_t width, uint32_t height,
|
||||
enum gs_color_format format);
|
||||
extern bool gl_copy_texture(struct gs_device *device, struct gs_texture *dst,
|
||||
uint32_t dst_x, uint32_t dst_y, struct gs_texture *src,
|
||||
uint32_t src_x, uint32_t src_y, uint32_t width,
|
||||
uint32_t height);
|
||||
|
||||
extern bool gl_create_buffer(GLenum target, GLuint *buffer, GLsizeiptr size,
|
||||
const GLvoid *data, GLenum usage);
|
||||
|
Reference in New Issue
Block a user