Kovid Goyal
72a1eb237d
Fix regression that broke drawing of hollow cursor when window loses focus
...
Fixes #255
2017-12-27 07:15:48 +05:30
Kovid Goyal
0fcce6ec58
Remove trailing whitespace from native code files
2017-12-20 08:44:47 +05:30
Kovid Goyal
433640de84
Support running on the "low power" GPU on dual GPU macOS machines
...
Fixes #136
2017-12-14 06:14:22 +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
9cda51b5a8
Store sprites in an RGBA texture
...
Needed to support color emoji
2017-12-09 12:01:42 +05:30
Kovid Goyal
466d96c167
Remove spurious call to Py_DECREF
2017-12-06 10:13:57 +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
b51100195a
Dont use FBO's unless absolutely necessary
...
Negative z-index images dont need FBO based rendering when the
background is opaque. Finishes up support for background_opacity.
Fixes #31
2017-12-01 12:16:16 +05:30
Kovid Goyal
86e33f739c
Ensure OS windows have both buffers cleared after a resize/on first render
2017-12-01 12:16:16 +05:30
Kovid Goyal
259dcf376c
DRYer
2017-12-01 12:16:16 +05:30
Kovid Goyal
da8944b551
...
2017-12-01 12:16:15 +05:30
Kovid Goyal
5e2587920a
Call glViewport in the render loop
...
Ensure FBOs have correct viewport
2017-12-01 12:16:15 +05:30
Kovid Goyal
b8e477c6eb
Clamp the FBO texture
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
444d9536a7
Graphics programs should generate pre-multipled colors in interleaved mode
...
Also fix a few OpenGL state initialization issues.
2017-12-01 12:16:15 +05:30
Kovid Goyal
ffff343e3d
Work on rendering to FBO
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
d9b0b5c08f
oops, forgot one place to enable GL_BLEND
2017-12-01 12:16:14 +05:30
Kovid Goyal
a561697f04
No need for GL_BLEND while drawing background colors
2017-12-01 12:16:14 +05:30
Kovid Goyal
bbc140e020
Only enable GL_BLEND when actually needed
2017-12-01 12:16:14 +05:30
Kovid Goyal
2bcbcfff44
Start work on background opacity
2017-12-01 12:16:14 +05:30
Kovid Goyal
1fb81d2265
Fix incorrect blending of foreground and background colors when negative z-index images are present
...
Also optimize the blending calculation a bit by using the mix() function
and just adding the text and strike alphas.
2017-12-01 12:16:14 +05:30
Kovid Goyal
3b4a242e26
Fix sprites uniform not being initialized when using layered rendering
...
Had no actual bad effects since it is initialized to zero anyway
2017-12-01 12:16:14 +05:30
Kovid Goyal
d7ea28f8e7
Fix sprite texture not initially bound for new OSWindow
2017-12-01 12:15:35 +05:30
Kovid Goyal
2b988b01c6
Get rid of the needs_render tracking as it was too fragile.
2017-12-01 12:15:34 +05:30
Kovid Goyal
82d17c8a59
DRYer
2017-12-01 12:15:32 +05:30
Kovid Goyal
598f08e222
Avoid unneccessary roundtrip through python to create VAOs
2017-12-01 12:15:32 +05:30
Kovid Goyal
49be779982
Port drawing of borders
2017-12-01 12:15:32 +05:30
Kovid Goyal
2ac8ad39c9
Implement destruction of OS windows
2017-12-01 12:15:32 +05:30
Kovid Goyal
e11a50ae83
Work on migrating the code needed for application startup
2017-12-01 12:15:32 +05:30
Kovid Goyal
141a08ec7c
Migrate child-monitor.c to use OSWindow
2017-12-01 12:15:31 +05:30
Kovid Goyal
ace91f04af
More appropriate location for function definition
2017-11-09 17:04:31 +05:30
Kovid Goyal
934d21ac30
Wire up a few remaining pieces
2017-11-09 16:55:46 +05:30
Kovid Goyal
79d8c04b00
Hook up render_line
2017-11-09 16:55:45 +05:30
Kovid Goyal
7d7d82a68d
Start working on actually rendering lines of text
2017-11-09 16:55:38 +05:30
Kovid Goyal
f25d2ea540
Rip out the old sprite update code
2017-11-09 16:45:45 +05:30
Kovid Goyal
8431eef970
Get rid of no longer needed GPU function indirection
2017-11-09 16:45:02 +05:30
Kovid Goyal
7941ac1810
Remove no longer needed mac specific OpenGL extensions check
2017-11-08 15:59:55 +05:30
Kovid Goyal
7ed272e971
Use the glad provided facility for debugging OpenGL
2017-11-08 15:40:07 +05:30
Kovid Goyal
6362499fc2
Switch to using glad instead of glew
2017-11-08 15:15:25 +05:30
Kovid Goyal
e43a26d64c
Better error message when GLEW initialization fails
2017-10-25 14:32:44 +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
02dc637ed0
Use the correct blend function for text
2017-10-17 09:51:21 +05:30
Kovid Goyal
090ee5b846
Disable graphics on older macOS machines
...
I give up, trying to work around Apple's buggy drivers without even
having a machine to test my workarounds on is too hard. Simply disable
graphics on macOS < 10.13
Fixes #141
2017-10-16 21:23:29 +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
d5088a3e5b
Do image clipping using OpenGL rather than on the CPU
2017-10-07 10:08:26 +05:30
Kovid Goyal
a4e7985fb0
Condition on negative refs as well as in the future we will use interleaved drawing for background opacity as well
2017-10-05 18:21:29 +05:30
Kovid Goyal
75244b1416
...
2017-10-04 23:07:59 +05:30
Kovid Goyal
952f0ad98c
Accommodate the underpowered Apple lineup
...
macOS is missing glDrawArraysInstancedBaseInstance
2017-10-04 22:44:03 +05:30