mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 10:12:17 +02:00
A spot of refactoring
This commit is contained in:
@@ -285,10 +285,8 @@ cell_prepare_to_render(ssize_t vao_idx, Screen *screen, GLfloat xstart, GLfloat
|
|||||||
bind_vertex_array(vao_idx);
|
bind_vertex_array(vao_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
draw_cells_impl(ssize_t vao_idx, GLfloat xstart, GLfloat ystart, GLfloat dx, GLfloat dy, Screen *screen, CursorRenderInfo *cursor) {
|
draw_all_cells(Screen *screen) {
|
||||||
cell_prepare_to_render(vao_idx, screen, xstart, ystart, dx, dy, cursor);
|
|
||||||
|
|
||||||
bind_program(CELL_PROGRAM);
|
bind_program(CELL_PROGRAM);
|
||||||
static bool cell_constants_set = false;
|
static bool cell_constants_set = false;
|
||||||
if (!cell_constants_set) {
|
if (!cell_constants_set) {
|
||||||
@@ -297,6 +295,13 @@ draw_cells_impl(ssize_t vao_idx, GLfloat xstart, GLfloat ystart, GLfloat dx, GLf
|
|||||||
}
|
}
|
||||||
glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, screen->lines * screen->columns); check_gl();
|
glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, screen->lines * screen->columns); check_gl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
draw_cells_impl(ssize_t vao_idx, GLfloat xstart, GLfloat ystart, GLfloat dx, GLfloat dy, Screen *screen, CursorRenderInfo *cursor) {
|
||||||
|
cell_prepare_to_render(vao_idx, screen, xstart, ystart, dx, dy, cursor);
|
||||||
|
draw_all_cells(screen);
|
||||||
|
|
||||||
|
}
|
||||||
// }}}
|
// }}}
|
||||||
|
|
||||||
// Cursor {{{
|
// Cursor {{{
|
||||||
|
|||||||
Reference in New Issue
Block a user