Commit Graph
42 Commits
Author SHA1 Message Date
Kovid Goyal b8faba2a16 More trailing space removal 2017-12-20 08:50:09 +05:30
Kovid Goyal 95683c658b When hovering over a URL, highlight the URL fully even if it continues over multiple lines. Note that URL detection has not changed. A URL will be detected only if the mouse hovers over the line containing the start of the URL. 2017-12-13 11:11:13 +05:30
Kovid Goyal 8d7515bd9b Basic color emoji rendering working
Still need to downscale color bitmaps to fit into cells
2017-12-09 12:01:43 +05:30
Kovid Goyal ed9b332da5 Add an option to control the underline style for highlighting URLs on mouse over 2017-12-05 12:28:10 +05:30
Kovid Goyal e81ba3b207 Change undercurl escape code to 4:x
See https://github.com/neovim/neovim/issues/7479
for discussion. Also implement double underline.
2017-12-04 12:26:50 +05:30
Kovid Goyal a3b85883f8 Block cursor should not be affected by background_opacity 2017-12-01 12:16:15 +05:30
Kovid Goyal be6151730d Fix SPECIAL stage in interleaved rendering 2017-12-01 12:16:15 +05:30
Kovid Goyal f85c050235 Get background_opacity working, at the cost of breaking negative z-index image rendering.
Image rendering will need to use an FBO since OpenGL cannot do proper alpha compositing.
As a first step, the interleaved shaders now generate premultiplied colors as opengl can only alpha blend pre-multipled colors
2017-12-01 12:16:14 +05:30
Kovid Goyal 66803e6873 Workaround to get graphics working on Apple's buggy products
Apparently some macOS OpenGL drivers cannot handle using a VAO with
attributes that have different divisors/apply to different shaders. So
use a separate VAO for graphics rendering. This is a small performance hit,
but is the price of supporting substandard computers.
2017-10-17 12:15:52 +05:30
Kovid Goyal e679fa9a1c Possible fix for #141
Presumably on older macOS versions the Apple OpenGL drivers cannot handle both
non-sequential and non-zero based binding locations. Sigh.
2017-10-16 18:39:49 +05:30
Kovid Goyal 3f8b2184a6 Add a sanity check to ensure the attribute location binding worked 2017-10-13 10:06:12 +05:30
Kovid Goyal 2f7e517b5b Update comment to reflect code 2017-10-12 16:51:35 +05:30
Kovid Goyal 555409ea73 Apple's OpenGL drivers are sad
Apparently they cant handle non-sequential binding locations. Sigh.
2017-10-12 15:36:38 +05:30
Kovid Goyal 124a41643f Add a comment about the use of layout locations 2017-10-04 17:29:30 +05:30
Kovid Goyal e1650d5df7 Implement interleaved drawing of cells 2017-10-04 16:11:20 +05:30
Kovid Goyal bd09e2ebf1 Allow re-using VAO objects between different types of cell program 2017-10-04 15:33:15 +05:30
Kovid Goyal ad040271b9 Initialize uniforms for all cell program variants 2017-10-04 14:46:36 +05:30
Kovid Goyal ead73c8209 Prepare for two stage rendering of cells 2017-10-04 14:15:51 +05:30
Kovid Goyal 7863857b2c Use a UBO for all cell program uniforms 2017-09-30 11:44:44 +05:30
Kovid Goyal 142cba54b3 DRYer 2017-09-17 19:36:47 +05:30
Kovid Goyal 19b065b6a4 Fix underline not being set to background color when cursor is over it 2017-09-17 19:28:01 +05:30
Kovid Goyal 826a64c8dc Fix wide cursor not being rendered 2017-09-17 19:23:01 +05:30
Kovid Goyal 14103db2ee Coalesce another couple of uniforms 2017-09-17 18:10:32 +05:30
Kovid Goyal 51d037fb70 Coalesce a couple of set uniform calls into a single one 2017-09-17 17:48:42 +05:30
Kovid Goyal b433380e1d Make the cell shader a little more readable 2017-09-17 17:38:03 +05:30
Kovid Goyal df4df76d24 Switch to using an opaque block cursor
The text is rendered in the background color on top of the opaque
block cursor. We use the background color since applications can change
both cursor and background colors, so it is up to the application to
ensure the colors have good contrast. Fix #126
2017-09-17 13:03:02 +05:30
Kovid Goyal 2d0c6a43c5 Fix broken reverse video 2017-09-16 17:39:07 +05:30
Kovid Goyal a92b3c605f Move the text attributes out of the char type
This means that more text attributes can be added in the future (there
are 8 bits available) and there is no need to keep bit twiddling when
accessing the chars themselves. Also means less data needs to be sent to
the GPU. Cell size does not change since there were currently 2 unused
bytes because of alignment.
2017-09-16 11:02:42 +05:30
Kovid Goyal 9989363ecd Make the URL highlight color configurable 2017-09-15 10:45:27 +05:30
Kovid Goyal 53ea5c678d Highlight links with a underline on mouseover 2017-09-15 10:45:27 +05:30
Kovid Goyal 1f9510ab9e Fix incorrect decoration colors 2017-09-15 10:45:16 +05:30
Kovid Goyal b8acb9b133 Pass cell data to GPU directly
Converts update_cell_range() to a simple memcpy(). The GPU has to do
roughly the same amount of work (there is one extra attribute, and one
extra calculation for reverse video).
2017-09-15 10:45:16 +05:30
Kovid Goyal a8d5ad2c1a ... 2017-09-15 10:45:15 +05:30
Kovid Goyal 4feff2e2da Fix rendering of strikethrough not working 2017-09-15 10:45:10 +05:30
Kovid Goyal d12573a67d Dont send the color table to the GPU on every frame 2017-09-15 10:45:09 +05:30
Kovid Goyal 34f946fd98 Move rendering of selection to GPU 2017-09-15 10:45:09 +05:30
Kovid Goyal a5bec84554 ... 2017-09-15 10:45:09 +05:30
Kovid Goyal a44e3a3a50 Ensure line numbers reported by the GLSL compiler are correct 2017-09-15 10:45:08 +05:30
Kovid Goyal db40445572 Do color mapping on the GPU 2017-09-15 10:45:08 +05:30
Kovid Goyal 1fcb865202 ... 2017-08-22 18:19:46 +05:30
Kovid Goyal 03e0b9de04 Use vertex buffers instead of texture buffers
Apparently, integer samplers for textFetch() are broken on some macOS
Intel drivers. Fixes #101
2017-08-22 12:08:35 +05:30
Kovid Goyal fe3e51a00d Move the GLSL shaders into their own files 2017-08-21 16:39:34 +05:30