Commit graph

14 commits

Author SHA1 Message Date
Kovid Goyal
b8c266a0d4
Move the kitty OpenGL code into a dynamically loaded GPU driver
All OpenGL calls now live in gpu/opengl, which is built as kitty/opengl.so,
next to the glfw backends. glfw_init() is passed the path to the driver and
loads it. The driver is initialized once the first OpenGL context is
current. fast_data_types no longer links against libGL.

kitty/gpu.c contains the driver loader and the higher level helpers
(programs and their metadata, vertex array objects, viewport stack) that
were previously in kitty/gl.c, implemented on top of the driver API.
shaders.c and the rest of kitty use only the driver API.

Also remove the unused GL_* constants and the unused bind_program,
create_vao, etc. functions exported to Python.
2026-11-19 19:57:32 +05:30
Kovid Goyal
7f0b072f0d
autoformat 2026-08-05 05:32:56 +05:30
Kovid Goyal
8860f1a0a7
ty does not enforce existence of type signatures on functions, so use ruff to do it 2026-07-07 13:56:54 +05:30
Kovid Goyal
9f51779750
More robust detection of support for GL_FRAMEBUFFER_SRGB
When not supported fallback to layer based rendering
2025-08-11 09:13:49 +05:30
Kovid Goyal
77292a16d6
Make shebangs consistent
Follow PEP 0394 and use /usr/bin/env python so that the python in the
users venv is respected. Not that the kitty python files are meant to be
executed standalone anyway, but, whatever.

Fixes #6810
2023-11-11 08:32:05 +05:30
Kovid Goyal
a09dda27dc
Merge branch 'master' of https://github.com/marcan/kitty 2023-02-10 10:55:41 +05:30
Kovid Goyal
7fe5d7b58f
Replace isort with ruff 2023-01-09 16:47:42 +05:30
Hector Martin
84aebae6a8 Downgrade OpenGL version requirement to 3.1
There are only a few features required from newer versions, and they
can be achieved via extensions. This significantly improves compatibility.
2022-12-20 16:22:05 +09:00
David Herberth
f872f955b0
Replace glad with glad2 2019-07-07 21:10:15 +02:00
Kovid Goyal
039f2b49e8
Remove workaround for #654 as it has been upstreamed 2018-07-19 05:11:03 +05:30
Kovid Goyal
bf0dcb1d2e
Update version of glad used to generate OpenGL wrapper
Also fix #654
2018-06-20 12:43:26 +05:30
Kovid Goyal
83850b28ae
Update GL wrapper generated by new version of glad 2018-05-04 18:12:31 +05:30
Kovid Goyal
ceef207812
Fix compilation with clang 2017-11-08 15:43:59 +05:30
Kovid Goyal
6362499fc2
Switch to using glad instead of glew 2017-11-08 15:15:25 +05:30