10 Commits

Author SHA1 Message Date
Qwerasd
5cb175ff63 renderer/OpenGL: use compressed texture formats for images
BPTC is required to be available OpenGL >= 4.2 and our minimum is 4.3 so
this is safe in terms of support. I tested briefly in a VM and didn't
encounter any problems so this should just be a complete win.

(Note: texture data is already automatically compressed on Metal)
2025-06-25 16:27:23 -04:00
Qwerasd
ea7a91e2ba style(renderer): explicit error sets 2025-06-20 15:18:41 -06:00
Qwerasd
371d62a82c renderer: big rework, graphics API abstraction layers, unified logic
This commit is very large, representing about a month of work with many
interdependent changes that don't separate cleanly in to atomic commits.

The main change here is unifying the renderer logic to a single generic
renderer, implemented on top of an abstraction layer over OpenGL/Metal.

I'll write a more complete summary of the changes in the description of
the PR.
2025-06-20 15:18:41 -06:00
Qwerasd
ea79fdea11 fix(OpenGL): use sRGB texture format for gamma correct interpolation
otherwise images will be too dark when scaled
2025-05-15 12:44:44 -06:00
Mitchell Hashimoto
4d0bf303c6 ci: zig fmt check
This adds a CI test to ensure that all Zig files are properly formatted.
This avoids unrelated diff noise in future PRs.
2025-03-18 13:58:49 -07:00
Julia
9c8c53bffb use main buffer and copy data to fbo texture (opengl) (#5294)
NEEDS REVIEW

continuation of #5037
resolves #4729 

renders all shaders to the default buffer and then copies it to the
designated custom shader texture.

this is a draft pr because:
- it introduces a new shader "pipeline" which doesnt fit in with how the
system was designed to work (which is only rendering to the fbo)
- im not sure if this is the best way to achieve shaders being able to
sample their output while also drawing to the screen. the cusom fbo
(previous implementation) was useful in that it modularized the custom
shader stage in rendering

---------

Co-authored-by: Mitchell Hashimoto <m@mitchellh.com>
2025-01-23 20:57:14 +00:00
Mitchell Hashimoto
f13ea7cace pkg/opengl: yeet usingns 2024-08-16 15:28:22 -07:00
Mitchell Hashimoto
76c76ce85e renderer/opengl: upload kitty image textures 2023-11-19 22:08:07 -08:00
Mitchell Hashimoto
c8a51a2158 renderer/opengl: create the screen texture 2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
8576acb89e renderer/opengl: move opengl API to pkg/opengl 2023-11-17 21:51:04 -08:00