From 2d619850aebedc93c3f7790d1383ef2fdae2b432 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Mon, 28 Nov 2022 13:12:53 +0300 Subject: 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. --- alacritty/src/renderer/text/gles2.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'alacritty/src/renderer/text') 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 { + pub fn new(allow_dsb: bool) -> Result { 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"); -- cgit