gl_common: initialize string marker logger
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -658,6 +658,11 @@ bool gl_init(struct gl_data *gd, session_t *ps) {
|
||||
// textures are already set up.
|
||||
gl_resize(gd, ps->root_width, ps->root_height);
|
||||
|
||||
gd->logger = gl_string_marker_logger_new();
|
||||
if (gd->logger) {
|
||||
log_add_target_tls(gd->logger);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -682,6 +687,11 @@ void gl_deinit(struct gl_data *gd) {
|
||||
glDeleteFramebuffers(1, &gd->blur_fbo);
|
||||
}
|
||||
|
||||
if (gd->logger) {
|
||||
log_remove_target_tls(gd->logger);
|
||||
gd->logger = NULL;
|
||||
}
|
||||
|
||||
gl_check_err();
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,8 @@ struct gl_data {
|
||||
GLuint blur_texture[2];
|
||||
// Temporary fbo used for blurring
|
||||
GLuint blur_fbo;
|
||||
|
||||
struct log_target *logger;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
Reference in New Issue
Block a user