aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/renderer/text/gles2.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-11-28 13:12:53 +0300
committerGitHub <noreply@github.com>2022-11-28 13:12:53 +0300
commit2d619850aebedc93c3f7790d1383ef2fdae2b432 (patch)
tree8098110fdfa1372c3c565ffb90288a30b48124b3 /alacritty/src/renderer/text/gles2.rs
parent19120f40be0d2555f984bcadafa0bde8f3df2311 (diff)
downloadr-alacritty-2d619850aebedc93c3f7790d1383ef2fdae2b432.tar.gz
r-alacritty-2d619850aebedc93c3f7790d1383ef2fdae2b432.tar.bz2
r-alacritty-2d619850aebedc93c3f7790d1383ef2fdae2b432.zip
Add 'debug.renderer' config option
This should help trouble shooting the renderer being created and different renderer options to determine when something like dual-source rendering isn't working.
Diffstat (limited to 'alacritty/src/renderer/text/gles2.rs')
-rw-r--r--alacritty/src/renderer/text/gles2.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/alacritty/src/renderer/text/gles2.rs b/alacritty/src/renderer/text/gles2.rs
index 29a80e98..2f537e5c 100644
--- a/alacritty/src/renderer/text/gles2.rs
+++ b/alacritty/src/renderer/text/gles2.rs
@@ -37,11 +37,12 @@ pub struct Gles2Renderer {
}
impl Gles2Renderer {
- pub fn new() -> Result<Self, Error> {
+ pub fn new(allow_dsb: bool) -> Result<Self, Error> {
info!("Using OpenGL ES 2.0 renderer");
- let dual_source_blending = GlExtensions::contains("GL_EXT_blend_func_extended")
- || GlExtensions::contains("GL_ARB_blend_func_extended");
+ let dual_source_blending = allow_dsb
+ && (GlExtensions::contains("GL_EXT_blend_func_extended")
+ || GlExtensions::contains("GL_ARB_blend_func_extended"));
if dual_source_blending {
info!("Using dual source blending");