Make the buffer clearing more robust
Now happens immediately after the buffer is swapped. Fixes #1104
This commit is contained in:
parent
3e26f96744
commit
235bcacc7b
@ -816,8 +816,11 @@ is_mouse_hidden(OSWindow *w) {
|
||||
|
||||
|
||||
void
|
||||
swap_window_buffers(OSWindow *w) {
|
||||
glfwSwapBuffers(w->handle);
|
||||
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
|
||||
|
||||
@ -437,11 +437,6 @@ blank_os_window(OSWindow *os_window) {
|
||||
bool
|
||||
send_cell_data_to_gpu(ssize_t vao_idx, ssize_t gvao_idx, GLfloat xstart, GLfloat ystart, GLfloat dx, GLfloat dy, Screen *screen, OSWindow *os_window) {
|
||||
bool changed = false;
|
||||
if (os_window->clear_count < 2) {
|
||||
os_window->clear_count++;
|
||||
blank_os_window(os_window);
|
||||
changed = true;
|
||||
}
|
||||
if (os_window->fonts_data) {
|
||||
if (cell_prepare_to_render(vao_idx, gvao_idx, screen, xstart, ystart, dx, dy, os_window->fonts_data)) changed = true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user