Commit Graph

186 Commits

Author SHA1 Message Date
Kovid Goyal
be34af4555 Remove inline from .c files
It is ignored by compilers and hides unused static functions
2021-08-03 09:11:17 +05:30
Kovid Goyal
521f921424 Fix a bunch of code scanning warnings 2020-07-07 09:52:59 +05:30
Kovid Goyal
7824739034 Ensure selection GPU buffer is refreshed after a resize
Fixes #2747 (I hope since I cannot reproduce)
2020-06-13 22:59:46 +05:30
Kovid Goyal
3d2cb37af0 Linux: Workaround for broken Nvidia drivers for old cards
Fixes #456
2020-05-18 13:41:23 +05:30
Kovid Goyal
4f4d562670 Fix background_tint making the window semi-transparent
Fixes #2618
2020-05-09 09:06:18 +05:30
Kovid Goyal
3bff3bcbe4 Fix selection not updating properly while scrolling
Fixes #2442
2020-03-18 18:48:59 +05:30
Kovid Goyal
a4cc10c41b More typing work 2020-03-04 06:10:57 +05:30
Kovid Goyal
3a64b835fb DRYer 2020-02-26 07:28:39 +05:30
Kovid Goyal
ce308286df Dont need to bind blit vertex array as cells vertex array is already bound 2020-02-02 20:56:42 +05:30
Kovid Goyal
7432a7f346 Bind empty VAO when tinting 2020-02-02 14:48:47 +05:30
Kovid Goyal
0830fc3b5a Make background_image tint useable even without a background image in a transparent window 2020-02-02 12:40:29 +05:30
Kovid Goyal
ab2c901e85 Implement bg image tint for transparent windows 2020-02-02 12:34:35 +05:30
Kovid Goyal
3774cc54c7 Fix rendering of semi-transparent bg images in semi-transparent windows
Output colors must be premultiplied
2020-02-02 11:45:48 +05:30
Kovid Goyal
330ed8e4ae Add an option to tint background images using the current background color
Note still has to be implemented for transparent windows
2020-02-02 11:22:21 +05:30
Kovid Goyal
8116ee015a API for changing the background image of OS windows
Uses reference counting
2020-02-01 09:17:41 +05:30
Kovid Goyal
eb60464177 No need to zero background opacity
We anyway dont draw the default background color in
draw_interleaved(_premult)
2020-01-31 18:51:02 +05:30
Kovid Goyal
44b2651a0f Fix draw_cells_interleaved_premult() for drawing with and without a background image 2020-01-31 15:40:00 +05:30
Kovid Goyal
f2e91b5ed2 Remove incorrect setting of bgimage unit in graphics program 2020-01-31 15:28:21 +05:30
Kovid Goyal
5263babc9a Use a single program for drawing background images 2020-01-31 15:09:47 +05:30
Kovid Goyal
9034b50b3a Dont use a separate background image opacity setting 2020-01-31 14:05:25 +05:30
Kovid Goyal
fdd7fe1948 Properly release resources used by bgimage
Also allow per OS Window bg images in the future
2020-01-31 12:17:54 +05:30
Kovid Goyal
8e7b8b70dc A VAO is not needed to draw background images 2020-01-31 11:34:34 +05:30
Kovid Goyal
ee53edd96d Fix conversion of background_image option to C
Should handle None and not rely on the python object's lifetime.
Also some miscellaneous cleanups.
2020-01-31 09:03:19 +05:30
Fredrick Brennan
8a6b8b415c More stylistic fixes 2020-01-31 09:48:28 +08:00
Fredrick Brennan
aaaa34e119 Move a bunch of unneeded stuff 2020-01-30 18:08:25 +08:00
Fredrick Brennan
9f364209af Add background_image 2020-01-30 17:23:42 +08:00
Fredrick Brennan
65a7b19f40 Make each OS window have its own framebuffer
This commit fixes graphics rendering when more than one OS window is
open, all OS windows are semi-transparent, and multiple windows contain
graphics.

This commit closes #2310.
2020-01-24 16:06:57 +08:00
Kovid Goyal
0ea7d24ba4 Fix incorrect offset when rendering images and there are +z-index, -z-index and --z-index images 2020-01-21 08:09:04 +05:30
Kovid Goyal
6c9861cb76 Fix incorrect blending of default bg color when using draw_cells_interleaved_premult with images but no below images 2020-01-21 07:59:44 +05:30
Kovid Goyal
d8ed135b46 Clean up rendering of cell backgrounds 2020-01-12 13:20:23 +05:30
Kovid Goyal
714bee7f45 Only use an extra draw call for the background when drawing interleaved cells if it is actually required 2020-01-12 09:37:16 +05:30
Fredrick Brennan
8020657d8c Allow drawing images below cells w/background 2020-01-11 16:56:59 +05:30
Kovid Goyal
d2067141d3 Fix #2226 2019-12-24 17:10:33 +05:30
Kovid Goyal
2f0b6e24c9 Use pre-multiplied alpha when clearing windows
Apparently most systems expect this. See https://github.com/glfw/glfw/issues/1538
2019-12-20 08:16:10 +05:30
Kovid Goyal
689d059517 Fix lines at the edge of the window at certain windows sizes when drawing images on a transparent window
Fixes #2079
Fixes #2214
2019-12-19 20:41:31 +05:30
Kovid Goyal
652eec3033 Fix a crash/incorrect rendering when detaching a window in some circumstances
Fixes #2173

Ensure all cell related GPU data is resent
2019-11-28 09:01:40 +05:30
Kovid Goyal
0d68b7078c Check for float conversion issues on build
Useful to catch any errors left over from the migration of times from
double to int64_t
2019-09-27 19:47:25 +05:30
Luflosi
2d06ee5822 Move allocation failure check closer to allocation 2019-09-19 14:58:39 +02:00
Kovid Goyal
931cb223cd When all visible windows have the same background color, use that as the color for the global padding, instead of the configured background color
See #1957
2019-09-07 18:47:15 +05:30
Kovid Goyal
40b9049deb Move the kitty OpenGL API into its own compilation unit 2019-07-12 15:29:48 +05:30
Kovid Goyal
15e8f6ad8a Another fix to the scissor for rendering the cell area
With a cyan background it becomes apparent that the width/height are one
pixel too small
2019-06-12 10:37:20 +05:30
Kovid Goyal
a5aca35f1c Simplify and document the operation of the cell fragment shader
Also get rid of the unneccessary double bg_alpha followed by divide by
alpha step when rendering interleaved and premult
2019-06-12 10:22:47 +05:30
Kovid Goyal
020c1311ca When resizing and only a single window is present in the current layout, use that window's background color to fill in the blank areas. 2019-05-29 09:01:57 +05:30
Kovid Goyal
4fff84b4b9 Add void to all function declarations for functions that take no arguments
Micro-optimization for some architectures. Enforced via
-Wstrict-prototypes
2019-05-13 11:04:21 +05:30
Kovid Goyal
6037167336 Allow controlling the ligature strategy dynamically, per window
Fixes #1574
2019-04-27 22:05:33 +05:30
Luflosi
d8eeed2296 Convert HTTP URLs to HTTPS URLs where possible 2019-04-24 01:27:24 +02:00
Kovid Goyal
934336e642 Allow disabling ligatures always 2019-04-20 08:25:44 +05:30
Kovid Goyal
fc1a8351b0 Dont use a wide cursor in beam an unfocused modes
Fixes #1486
2019-03-20 19:57:59 +05:30
Luflosi
999a6a288c Do not render ligatures under cursor 2019-03-20 01:35:03 +01:00
Kovid Goyal
8b5f02bb0b Fix shader invocation for cells output during resize 2019-03-04 19:54:10 +05:30