update some comments

This commit is contained in:
Mitchell Hashimoto
2022-04-19 09:02:50 -07:00
parent c43c1d38f1
commit ac8120f073
2 changed files with 4 additions and 1 deletions

View File

@ -61,7 +61,9 @@ void main() {
gl_Position = projection * vec4(cell_pos, 0.0, 1.0); gl_Position = projection * vec4(cell_pos, 0.0, 1.0);
color = bg_color_in / 255.0; color = bg_color_in / 255.0;
} else { } else {
// TODO: why? // The glyph offset is upside down so we need to reverse it to
// be based on the offset of our cell. This is equivalent to
// "1 - value" to flip the value.
vec2 glyph_offset_calc = glyph_offset; vec2 glyph_offset_calc = glyph_offset;
glyph_offset_calc.y = cell_size.y - glyph_offset.y; glyph_offset_calc.y = cell_size.y - glyph_offset.y;

View File

@ -245,6 +245,7 @@ pub fn updateCells(self: *Grid, term: Terminal) !void {
if (cell.empty()) continue; if (cell.empty()) continue;
// Get our glyph // Get our glyph
// TODO: if we add a glyph, I think we need to rerender the texture.
const glyph = try self.font_atlas.addGlyph(self.alloc, cell.char); const glyph = try self.font_atlas.addGlyph(self.alloc, cell.char);
self.cells.appendAssumeCapacity(.{ self.cells.appendAssumeCapacity(.{