Fix wide cursor not being rendered
This commit is contained in:
parent
14103db2ee
commit
826a64c8dc
@ -2,7 +2,7 @@
|
||||
uniform float geom[6];
|
||||
uniform ivec2 color_indices;
|
||||
uniform uint default_colors[6];
|
||||
uniform uint dimensions[8];
|
||||
uniform uint dimensions[9];
|
||||
uniform ColorTable {
|
||||
uint color_table[256]; // The color table
|
||||
};
|
||||
@ -18,9 +18,10 @@ uniform ColorTable {
|
||||
#define ynum dimensions[1]
|
||||
#define cursor_x dimensions[2]
|
||||
#define cursor_y dimensions[3]
|
||||
#define url_y dimensions[5]
|
||||
#define url_xl dimensions[4]
|
||||
#define url_xr dimensions[6]
|
||||
#define cursor_w dimensions[4]
|
||||
#define url_xl dimensions[5]
|
||||
#define url_y dimensions[6]
|
||||
#define url_xr dimensions[7]
|
||||
#define sprite_dx geom[4]
|
||||
#define sprite_dy geom[5]
|
||||
|
||||
@ -100,7 +101,7 @@ float in_range(uint x, uint y) {
|
||||
}
|
||||
|
||||
float is_cursor(uint x, uint y) {
|
||||
if (x == cursor_x && y == cursor_y) return 1.0;
|
||||
if (y == cursor_y && (x == cursor_x || x == cursor_w)) return 1.0;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
@ -629,8 +629,8 @@ draw_cells_impl(ssize_t vao_idx, GLfloat xstart, GLfloat ystart, GLfloat dx, GLf
|
||||
bind_program(CELL_PROGRAM);
|
||||
bind_vao_uniform_buffer(vao_idx, 2, cell_color_table_block_index);
|
||||
static GLuint dimensions[8];
|
||||
dimensions[0] = screen->columns; dimensions[1] = screen->lines; dimensions[2] = cx; dimensions[3] = cy;
|
||||
screen_url_range(screen, dimensions + 4);
|
||||
dimensions[0] = screen->columns; dimensions[1] = screen->lines; dimensions[2] = cx; dimensions[3] = cy; dimensions[4] = cx + MAX(1, screen_current_char_width(screen)) - 1;
|
||||
screen_url_range(screen, dimensions + 5);
|
||||
glUniform1uiv(UL(dimensions), sizeof(dimensions) / sizeof(dimensions[0]), dimensions);
|
||||
static GLfloat geom[6];
|
||||
unsigned int x, y, z;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user