Rename --debug-gl to --debug-rendering

This commit is contained in:
Alexander Kobel 2020-04-14 19:35:40 +02:00
parent e9be66126b
commit e6e61028b1
6 changed files with 10 additions and 10 deletions

View File

@ -662,9 +662,9 @@ can open a new kitty window to replay the commands with::
Path to file in which to store the raw bytes received from the child process
--debug-gl
--debug-rendering
type=bool-set
Debug OpenGL commands. This will cause all OpenGL calls to check for errors
Debug rendering commands. This will cause all OpenGL calls to check for errors
instead of ignoring them. Useful when debugging rendering problems

View File

@ -553,7 +553,7 @@ def update_window_visibility(
def set_options(
opts: Options,
is_wayland: bool = False,
debug_gl: bool = False,
debug_rendering: bool = False,
debug_font_fallback: bool = False
) -> None:
pass

View File

@ -46,7 +46,7 @@ gl_init() {
if (!gl_version) {
fatal("Loading the OpenGL library failed");
}
if (!global_state.debug_gl) {
if (!global_state.debug_rendering) {
gladUninstallGLDebug();
}
gladSetGLPostCallback(check_for_gl_error);
@ -59,7 +59,7 @@ gl_init() {
glad_loaded = true;
int gl_major = GLAD_VERSION_MAJOR(gl_version);
int gl_minor = GLAD_VERSION_MINOR(gl_version);
if (global_state.debug_gl) printf("GL version string: '%s' Detected version: %d.%d\n", glGetString(GL_VERSION), gl_major, gl_minor);
if (global_state.debug_rendering) printf("GL version string: '%s' Detected version: %d.%d\n", glGetString(GL_VERSION), gl_major, gl_minor);
if (gl_major < OPENGL_REQUIRED_VERSION_MAJOR || (gl_major == OPENGL_REQUIRED_VERSION_MAJOR && gl_minor < OPENGL_REQUIRED_VERSION_MINOR)) {
fatal("OpenGL version is %d.%d, version >= 3.3 required for kitty", gl_major, gl_minor);
}

View File

@ -152,7 +152,7 @@ class AppRunner:
def __call__(self, opts: OptionsStub, args: CLIOptions, bad_lines: Sequence[BadLine] = ()) -> None:
set_scale(opts.box_drawing_scale)
set_options(opts, is_wayland(), args.debug_gl, args.debug_font_fallback)
set_options(opts, is_wayland(), args.debug_rendering, args.debug_font_fallback)
set_font_family(opts, debug_font_matching=args.debug_font_fallback)
try:
_run_app(opts, args, bad_lines)

View File

@ -577,14 +577,14 @@ PYWRAP1(handle_for_window_id) {
PYWRAP1(set_options) {
PyObject *ret, *opts;
int is_wayland = 0, debug_gl = 0, debug_font_fallback = 0;
PA("O|ppp", &opts, &is_wayland, &debug_gl, &debug_font_fallback);
int is_wayland = 0, debug_rendering = 0, debug_font_fallback = 0;
PA("O|ppp", &opts, &is_wayland, &debug_rendering, &debug_font_fallback);
global_state.is_wayland = is_wayland ? true : false;
#ifdef __APPLE__
global_state.has_render_frames = true;
#endif
if (global_state.is_wayland) global_state.has_render_frames = true;
global_state.debug_gl = debug_gl ? true : false;
global_state.debug_rendering = debug_rendering ? true : false;
global_state.debug_font_fallback = debug_font_fallback ? true : false;
#define GA(name) ret = PyObject_GetAttrString(opts, #name); if (ret == NULL) return NULL;
#define SS(name, dest, convert) { GA(name); dest = convert(ret); Py_DECREF(ret); if (PyErr_Occurred()) return NULL; }

View File

@ -196,7 +196,7 @@ typedef struct {
bool terminate;
bool is_wayland;
bool has_render_frames;
bool debug_gl, debug_font_fallback;
bool debug_rendering, debug_font_fallback;
bool has_pending_resizes, has_pending_closes;
bool in_sequence_mode;
bool tab_bar_hidden;