Move the os window clearing into render_os_window
Makes more sense to clear the buffer immediately before rendering rather than immediately after swapping.
This commit is contained in:
parent
aa7024b264
commit
18a07a78b5
@ -602,6 +602,8 @@ prepare_to_render_os_window(OSWindow *os_window, double now, unsigned int *activ
|
||||
|
||||
static inline void
|
||||
render_os_window(OSWindow *os_window, double now, unsigned int active_window_id, color_type active_window_bg, unsigned int num_visible_windows) {
|
||||
// ensure all pixels are cleared to background color at least once in every buffer
|
||||
if (os_window->clear_count++ < 3) blank_os_window(os_window);
|
||||
Tab *tab = os_window->tabs + os_window->active_tab;
|
||||
BorderRects *br = &tab->border_rects;
|
||||
draw_borders(br->vao_idx, br->num_border_rects, br->rect_buf, br->is_dirty, os_window->viewport_width, os_window->viewport_height, active_window_bg, num_visible_windows, os_window);
|
||||
|
||||
@ -818,9 +818,6 @@ is_mouse_hidden(OSWindow *w) {
|
||||
void
|
||||
swap_window_buffers(OSWindow *os_window) {
|
||||
glfwSwapBuffers(os_window->handle);
|
||||
// ensure all pixels are cleared to background color at least once in the
|
||||
// new buffer
|
||||
if (os_window->clear_count++ < 2) blank_os_window(os_window);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user