diff --git a/kitty/main.py b/kitty/main.py index 789b338a5..e46e4fb80 100644 --- a/kitty/main.py +++ b/kitty/main.py @@ -98,6 +98,14 @@ def option_parser(): default=None, help=_('Replay previously dumped commands') ) + a( + '--debug-gl', + action='store_true', + default=False, + help=_('Debug OpenGL commands. This will cause all OpenGL calls' + ' to check for errors instead of ignoring them. Useful' + ' when debugging rendering problems.') + ) a( '--window-layout', default=None, @@ -226,7 +234,7 @@ def main(): opts = load_config(*config, overrides=overrides) change_wcwidth(not opts.use_system_wcwidth) glfw_set_error_callback(on_glfw_error) - enable_automatic_opengl_error_checking(False) + enable_automatic_opengl_error_checking(args.debug_gl) if not glfw_init(): raise SystemExit('GLFW initialization failed') try: